9、python基础知识-if判断

#!/usr/bin/env python
# _*_ coding: utf-8 _*_

num = 36
guess_num = int(input(">>>:"))

if guess_num == num :
print("Yes,your got it...")
else:
print("No,it's wrong...")

# c:\python_note>python 9、python基础知识-if判断.txt
# >>>:20
# No,it's wrong...
#
# c:\python_note>python 9、python基础知识-if判断.txt
# >>>:36
# Yes,your got it...

score = int(input("score:"))

if score > 90:
print ("A")
elif score > 80:
print ("B")
elif score > 70:
print ("C")
elif score > 50:
print ("D")
else:
print ("Other!...")

# c:\python_note>python 9、python基础知识-if判断.txt
# score:85
# B

posted @ 2019-05-24 22:22  hlc-123  阅读(163)  评论(0编辑  收藏  举报