no message
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
# 双分支
|
||||
num1=eval(input("请输入幸运数字:"))
|
||||
|
||||
if num1==1:
|
||||
print("幸运数字1")
|
||||
else:
|
||||
print("输入了其他幸运数字")
|
||||
@@ -0,0 +1,2 @@
|
||||
num = eval(input("请输入幸运数字:"))
|
||||
print("输入了幸运数字1") if num==1 else print('输入了其他幸运数字')
|
||||
@@ -0,0 +1,2 @@
|
||||
num = eval(input('输入了其他幸运数字:'))
|
||||
print(f'您输入了幸运数字{num}') if num>=10 else print('输入了其他幸运数字!')
|
||||
@@ -0,0 +1,13 @@
|
||||
# 匹配模式
|
||||
num=eval(input("请输入幸运数字:"))
|
||||
match num:
|
||||
case 1:
|
||||
print("您输入了其他幸运数字1")
|
||||
case 2:
|
||||
print('您输入了其他幸运数字2')
|
||||
case 3:
|
||||
print('您输入了其他幸运数字3')
|
||||
case 4:
|
||||
print('您输入了其他幸运数字4')
|
||||
case 12:
|
||||
print('您输入了其他幸运数字12')
|
||||
@@ -1,6 +1,6 @@
|
||||
#保留字
|
||||
#123
|
||||
import 保留字
|
||||
import keyword
|
||||
print(keyword.kwlist)
|
||||
print(len(keyword.kwlist))
|
||||
print(keyword.kwlist)
|
||||
@@ -1,3 +1,2 @@
|
||||
number=eval(input("请输入幸运数字:"))
|
||||
result="恭喜您中奖啦!" if number>60 else "hehe!"
|
||||
print(result)
|
||||
num=eval(input("请输入幸运数字:"))
|
||||
print('输入了幸运数字1') if num==1 else print('输入了其他幸运数字')
|
||||
Reference in New Issue
Block a user