May-20-2020, 09:40 AM
(This post was last modified: May-20-2020, 09:40 AM by Riteshfrancis.)
Hello Friends:
Can someone please help me and tell me what is wrong with follwing code of mine. After entering the input, system is coming out of the loop and executing last two lines.
Can someone please help me and tell me what is wrong with follwing code of mine. After entering the input, system is coming out of the loop and executing last two lines.
count = 0 tot = 0 while True : num = input('Enter a number: ') if num == 'Done': break try: nm = float(num) count = count+1 tot = tot + nm except: print ('Invalid Entry') continue print(tot/count)