if-elif-else文の使用


#   if-elif-else     :              ,       ,           
#               ,  if-elif-else       ,                
# else  

score = float(input("       :"))

#             
if score >= 90 and score <= 100:
    #       ,           
    print("  ")
elif score >= 80 and score < 90:
    #       ,           
    print("  ")
elif score >= 70 and score < 80:
    #       ,           
    print("   ")
elif score >= 60 and score < 70:
    #       ,           
    print("    ")
elif score >= 0 and score < 60:
    #       ,           
    print("   ")
else:
    #            ,    else  
    print("       , 0-100  !")


    :

       :20
   

     ,    0


       :68
    

     ,    0

       :90
  

     ,    0
#   if-elif-else     :              ,       ,           
#               ,  if-elif-else       ,                
# else  

score = float(input("       :"))

#             
if 90 <= score <= 100:
    #       ,           
    print("  ")
elif 80 <= score < 90:
    #       ,           
    print("  ")
elif 70 <= score < 80:
    #       ,           
    print("   ")
elif 60 <= score < 70:
    #       ,           
    print("    ")
elif 0 <= score < 60:
    #       ,           
    print("   ")
else:
    #            ,    else  
    print("       , 0-100  !")


# else     ,           ,    else  

    :

       :89
  

     ,    0