Output: Program did not output anything!




score = [] #Empty list

#creating two int variable to count goals of each team
countTeam_1 = 0
countTeam_2 = 0

#infinte loop
while True:

#Getting input from user
s = int(input())

#condition: Checking input is in between 0 and 2
if(s>=0 and s<=2):
    if(s==0): #if input is 0 then break the loop
        break
    score.append(s) #Adding score to empty lit
else:
    #Warning user for invalid input 
    print("Invalid Input...Enter value 0,1,2")

iterate through list and count the goals for individual team

for i in score:
if(i==1):
countTeam_1 += 1
else:
countTeam_2 += 1

#printing team goals
print(f"Team 1 : {countTeam_1} goals")
print(f"Team 2 : {countTeam_2} goals")

#condition to print which team won or game tied
if(countTeam_1>countTeam_2):
print("Team 1 won")
elif(countTeam_1<countTeam_2):
print("Team 2 won")
else:
print("Both tied")

Note: This is the
Output:
Program did not output anything!