Dec-23-2021, 04:18 PM
(This post was last modified: Dec-23-2021, 04:18 PM by BashBedlam.)
It would me much easier if you left the input numbers as strings instead of changing them to intergers.
# This version asks for the 7 numbers first then counts the amount 0's after nums = '' for x in range(7): num = input('number: ') nums = nums + num zeros = nums.count('0') print(f"number of 0's is {zeros}")