0

Check my code I don't know that why it gives error on else..

i=int(input('please enter score')) if i<=100 and i>=90: print('A') elif i<=89 and i>=80: print('B') elif i<=79 and i>=70: print('C') elif i<=69 and i>=60: print('C') elif i<60 and i>0: print("F") else i>100 or i<0: print('Enter valid score')

13th Mar 2022, 3:50 AM
Abdul Wasay Ali Khaled
Abdul Wasay Ali Khaled - avatar
3 Answers
+ 3
You can't use a condition in an else statement.
13th Mar 2022, 4:00 AM
Simon Sauter
Simon Sauter - avatar
+ 2
See Last line Else statement is wrong. It does not take condition.
13th Mar 2022, 4:05 AM
NonStop CODING
NonStop CODING - avatar
+ 1
Thanks to allšŸ¤£šŸ¤£šŸ¤£...i literally forgot that..šŸ¤£šŸ¤£šŸ¤£Thanks again
13th Mar 2022, 4:14 AM
Abdul Wasay Ali Khaled
Abdul Wasay Ali Khaled - avatar