0
Percentage grade to letter grade. I'm having trouble with my code. This is only the begining of my code. Help please. I
grade = (input()) grade = 100 if grade >= 90 and grade <= 100: print('a') if grade >= 80 and grade <= 89: print('b')
7 Answers
+ 7
You might need to cast your input to integer and also use "elif" in the if statement.
+ 7
You might want to try ternary statements here:
if 80 <= x <= 89:
block_of_code
That keeps the code more concise.
+ 6
Make your code public. It's easy to help like that.
+ 4
I debuged it,
The text needs work.
edit
I deleted the old post, its code was wrong
https://code.sololearn.com/cYIMEBTrlWVL/?ref=app
+ 3
@Kuba Thank you,
I did not know,
that is was possible put statements together like that.
+ 1
still getting an error
+ 1
thank you everyone