fork download
  1. import random
  2.  
  3. a = []
  4. for i in range(5):
  5. a.append(int(random.random() *100))
  6.  
  7. print(a)
  8.  
  9. Chetniye = 0
  10. NeChetniye = 0
  11.  
  12. for i in a:
  13. if i%2 == 0:
  14. Chetniye += 1
  15. else:
  16. NeChetniye += 1
  17.  
  18. print("Kolichestvo chetnih chisel:",Chetniye)
  19. print("Kolichestvo NE chetnih chisel:", NeChetniye)
Success #stdin #stdout 0.01s 9856KB
stdin
Standard input is empty
stdout
[7, 4, 70, 15, 24]
('Kolichestvo chetnih chisel:', 3)
('Kolichestvo NE chetnih chisel:', 2)