Skip to content

Commit

Permalink
more condition
Browse files Browse the repository at this point in the history
  • Loading branch information
snow feng committed Dec 31, 2023
1 parent 54c028b commit 32fed29
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions CartonPython/lesson5/ch5_1_2_plus.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# coding=utf-8
# Filename: ch5_1_2_plus.py

score = int(input("请输入一个0~100的整数:"))

if score > 100:
print("输入不正确,哪有这么多分啊!")
elif score == 100:
print("哇哦,满分哦!你真棒!")
elif score >= 85:
print("成绩不错!")
elif score >= 60:
print("加把劲!")
elif score >= 0:
print("不及格啦,这可不行!")
else:
print ("输入错误,没有负分!")

0 comments on commit 32fed29

Please sign in to comment.