fork download
  1. # your code goes here
  2. list_num = [ ]
  3. count_even = 0
  4.  
  5. loop_condition= True
  6.  
  7. while(loop_condition == True):
  8. integer_enter= int(input())
  9. integer_append= list_num.append(integer_enter)
  10. if(integer_enter % 2 == 0 and integer_enter != 0):
  11. count_even += 1
  12. elif(integer_enter == 0):
  13. loop_condition = False
  14.  
  15.  
  16.  
  17.  
  18. print('The number of even integers is %d' % count_even)
  19.  
  20. print(list_num)
Success #stdin #stdout 0s 9032KB
stdin
2
4
5
0
stdout
The number of even integers is 2
[2, 4, 5, 0]