Mode Gelap

Recent in Fashion

Best Seller Books

Grade

  • Problem Description

    Write a program asks the user to enter a exam score, and then prints the grade (A/B/C/D) that corresponds to the score. 

    If the score that the user entered is less than 0 or greater than 100, the program prints an error message.
    Use the following grades
    A grade >=85
    B grade 70-85
    C grade 50-70
    D grade <50

    Mandatory:

    Use if and elif
  • CODING ARENA
  • a=int(input())
    if(a>=85 and a<=100):
        print("A")
    elif(a>=70 and a<85):
        print("B")
    elif(a>=50 and a<70):
        print("C")
    else:
        print("D")
  • Test Case 1

    Input (stdin)
    85

    Expected Output
    A
  • Test Case 2

    Input (stdin)
    78

    Expected Output
    B

Subscribe Our Newsletter

avatar
"By speaking behind my back, it means that you respect my existence enough not to act in front of my face."

Related Posts

0 Comment

Post a Comment

Article Top Ads

Parallax Ads

Article Center Ads

Article Bottom Ads