fork download
  1. from random import randint
  2. mas = [0] * 10
  3. for j in range (0, 10):
  4. s = randint(1, 5)
  5. mas[j] = s
  6. print (mas)
  7. t = 0
  8. for j in range(0, 10):
  9. if mas[j] == 3:
  10. t = t + 1
  11. print (t)
Success #stdin #stdout 0.02s 11580KB
stdin
1 2 3 4 5 1 2 3 4 5
stdout
[4, 4, 3, 1, 3, 3, 1, 1, 5, 4]
3