no message

This commit is contained in:
macbook
2024-01-01 16:50:40 +08:00
parent f80e3d5d90
commit 122fca1c7d
14 changed files with 28 additions and 1 deletions
+2
View File
@@ -0,0 +1,2 @@
for i in "chenxuan":
print(i)
+3
View File
@@ -0,0 +1,3 @@
for i in range(1,13):
if i%2==0:
print(i,"是偶数")
+4
View File
@@ -0,0 +1,4 @@
s=0
for i in range(1,101):
s+=i
print(s)
+6
View File
@@ -0,0 +1,6 @@
s=0
for i in range(1,11):
s+=i
else:
print(s)
# for 正常执行完后执行else语句
@@ -1,5 +1,5 @@
scope=eval(input("亲输入您的成绩")) scope=eval(input("亲输入您的成绩"))
if scope<0 or scope>100: if scope<0 or scope>120:
print("您的成绩输入有误") print("您的成绩输入有误")
elif 0<=scope<60: elif 0<=scope<60:
print("未及格") print("未及格")
@@ -11,3 +11,5 @@ elif 90<=scope<100:
print("非常优秀") print("非常优秀")
elif scope==100: elif scope==100:
print("满分") print("满分")
else:
print("hehe")
@@ -0,0 +1,10 @@
scope=input("请输入成绩等级")
match scope:
case 'A':
print("一级")
case 'B':
print("二级")
case "C":
print("三级")
case "D":
print("四级")