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

猜你喜欢

转载自www.cnblogs.com/hlc-123/p/10920508.html