Commit 046f7fc0 by BellCodeEditor

save project

parent 4e5243c7
Showing with 21 additions and 8 deletions
i = 1 # 行
j = 1 # 列
for i in range(1,10):
for j in range(1,i+1):
print(i,"*",j,"=",i*j,end=(" "))
print()
# 使用变量i和j,代替乘法算式里面的元素,打印出单个乘法算式
\ No newline at end of file
#for i in range(10):
# if i==5:
# continue
# print(i)
#print("helllo")
import random
i=5
t=random.randint(1,100)
while i>0 :
a=int(input("请在1到100之间选一个数字"))
if a>t:
print("大了")
elif a<t:
print("小了")
else:
print("赢了")
break
i-=1
print("你有",i,"次机会")
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment