Commit 01a201c3 by BellCodeEditor

save project

parent de730dcb
Showing with 24 additions and 6 deletions
def x(num):
if num==1:
def func(n):
if n<=2:
return 1
return num+x(num-1)
print(x(60))
elif n>2:
value=func(n-1)+func(n-2)
return value
result=func(5)
print(70)
\ No newline at end of file
import random
import random
a=random.randint(0,100)
def yukun(a):
n=int(input())
if n==a:
print('游戏结束')
elif n>a:
print('大了')
yukun(a)
else:
print('小了')
yukun(a)
yukun(a)
\ 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