Learn to code with step-by-step lessons. A place for students to work through programming fundamentals and build skills.
One possible program:
count = 0
while True:
num = int(input("Enter ticket number (-1 to stop): "))
if num == -1:
break
if num % 2 == 0:
count += 1
print("Even ticket numbers entered:", count)