120k views
0 votes
Test if a number grade is an A (greater than or equal to 90). If so, print "Great!". Hint: Grades may be decimals. Sample Run Enter a Number: 98.5 Sample Output Great!

1 Answer

1 vote

Answer:

In Python:

grade = float(input("Enter a Number: "))

if grade >= 90:

print("Great!")

Step-by-step explanation:

This prompts the user for grade

grade = float(input("Enter a Number: "))

This checks for input greater than or equal to 90

if grade >= 90:

If yes, this prints "Great"

print("Great!")

User Sschober
by
5.8k points