if elif in python

marks = 99
if marks >= 90:
   grade = 'A'
elif marks >= 80:
   grade = 'B'
elif marks >= 70:
   grade = 'C'
elif marks >= 60:
   grade = 'D'
else:
   grade = 'F'
print(grade)

Enjoyed this post? Share it!

 

Leave a comment

Your email address will not be published.