Commit 339881a6 by BellCodeEditor

save project

parent 92449b0c
Showing with 32 additions and 5 deletions
def f(n):
if n<=2:
return 1
v=f(n-1)+f(n-2)
return v
res=f(8)
print(res)
\ No newline at end of file
list1 = [] #
for a in range(0, 1000):
for b in range(0, 1000): # def maopao(list):
list1.insert(0, 0) # n=len(list)
\ No newline at end of file # for i in range(n-1):
# for j in range(n-1):
# if list[j]>list[j-1]:
# list[j],list[j-1]==list[j-1],list[j]
num_list=[]
n=int(input("请输数字个数字:"))
for i in range(n):
num=int(input("输第"+str(i+1)+"个数字"))
num_list.append(num)
for i in range(n-1):
for j in range(n-1):
if list[j]>list[j-1]:
list[j],list[j-1]==list[j-1],list[j]
print(num_list)
\ 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