Feb-02-2020, 05:12 PM
(This post was last modified: Feb-02-2020, 06:00 PM by Asm0deus314.)
Exercise 1:
What’s wrong with this code?
The following code should read an integer into the variable rating:
rating = input ('Enter an integer rating between 1 and 10')
Exercise 2:
Replace *** in the following code with a statement that will print the message 'Congratulations! Your grade of 91 earns you an A in this course'.
Your statement should print the value stored in the variable grade:
grade = 91
if grade >= 90:
***
Edit: I know this is day one stuff. I've tried figuring it out, but the phrasing is ambiguous to me. It's an online course, and the professor is very unhelpful. I'm not just looking for answers, but would appreciate an explanation so I can actually learn it. Thanks!
What’s wrong with this code?
The following code should read an integer into the variable rating:
rating = input ('Enter an integer rating between 1 and 10')
Exercise 2:
Replace *** in the following code with a statement that will print the message 'Congratulations! Your grade of 91 earns you an A in this course'.
Your statement should print the value stored in the variable grade:
grade = 91
if grade >= 90:
***
Edit: I know this is day one stuff. I've tried figuring it out, but the phrasing is ambiguous to me. It's an online course, and the professor is very unhelpful. I'm not just looking for answers, but would appreciate an explanation so I can actually learn it. Thanks!