[python practice questions] program 15

#Question : Use the nesting of conditional operators to complete this question: students with grades >= 90 are represented by A, those with scores between 60-89 are represented by B, and those with scores below 60 are represented by C. 
n = input( ' Please enter the grade: ' )

n = int(n)


if n > 90 :
     print ( ' Grade: A ' )
 elif n >=60 :
     print ( ' B ' )
 else :
     print ( ' C ' )

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325078552&siteId=291194637