Add 100 字符极简小游戏 - 猜数字
This commit is contained in:
@@ -0,0 +1,5 @@
|
|||||||
|
"""100 字符小游戏 - 猜数字"""
|
||||||
|
import random
|
||||||
|
n=random.randint(1,100);print("猜 1-100 的数字")
|
||||||
|
while True:
|
||||||
|
g=int(input("猜:"));print("大了!"if g>n else "小了!"if g<n else "对了!");exec("break"if g==n else"")
|
||||||
Reference in New Issue
Block a user