We read your photo as:
Write a Python program to assign a grade (Platinum, Gold, Silver, Bronze) based on a given score.
Computer Science
ScanSolve AI Answer
Here is the Python program that asks for a score and displays the corresponding grade:
score = int(input("Enter your score - "))
if score >= 30:
print("Platinum")
elif score >= 25:
print("Gold")
elif score >= 20:
print("Silver")
elif score >= 10:
print("Bronze")
This code first prompts the user to enter their score and converts it to an integer. It then uses a series of if-elif statements to check the score against the grading criteria, printing the highest applicable grade.
Was this helpful?
Still stuck on this one?
Ask a follow-up, and the answer starts from this question.
Got a different question?Ask your own question
More Computer Science Questions
QWrite a Python program to assign a rank based on a player's score.QWrite a Python program to calculate and display the total, average, highest, and lowest scores for…QWrite a Python program to input 20 student scores and calculate total, average, highest, and lowest…QWrite a program that accept marks in 4 subjects, the program then compute and output total, average…QHow to write a C program to evaluate student grades using a switch statement and how to compile and…