Jul-05-2020, 08:52 PM
i= 1 top_hat= [] while i<=5: try: top_hat.append(int(input('Please enter your top hat score: '))) i+=1 except: print('Please enter valid number: ') print(top_hat) top_hat_total=[] for x in top_hat_total: top_hat_total.append(x*(2/100)) print('your total percentage from top hat is: ' + str(sum(top_hat_total)))No matter what i enter for numbers at the end it prints out as 'your total percentage from top hat is:0'
Why?