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