In Python, a simple program
• Use the input function to get the user's grade (Grade can be A, B, C, D or F) • Use the if statement to compare the grade with the letters A, B, C, D or F • If grade is A - print "Your grade is A" • If grade is B - print "Your grade is B" • If grade is C - print "Your grade is C" • If grade is D - print "Your grade is D" • If grade is F - print "Your grade is F" If grade does not match one of A,B,C,D or F, print "Unknown letter grade" Make sure to use the if, elif and else in your exercise
In Python, a simple program
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am