首页 > 编程语言 > 详细

9、python基础知识-if判断

时间:2019-05-24 22:35:54      阅读:154      评论:0      收藏:0      [点我收藏+]

#!/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

9、python基础知识-if判断

原文:https://www.cnblogs.com/hlc-123/p/10920508.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!