Commit afc6927f by BellCodeEditor

auto save

parent 136b2d74
Showing with 15 additions and 23 deletions
# 尝试编写func()函数输出斐波那契数列的第十五个数是什么? name='刘强'
# 斐波那契数列:1,1,2,3,5,8,13,21,34,55…… power=66
def func(n): hero=['赵一'30'丁二'37'孙五'52'王猛'89'周亮'98]
for i in range(len(hero)):
if i%2==1 and hero[i]>=power:
hero.insert(i-1,name)
hero.insert(i,power)
print((hero))
\ No newline at end of file
print(func(15)) #调用函数并打印结果
input("姓名:") as1 = input("姓名:")
a = input() as2 = input("爱好:")
print("a") as3 = input("未来的目标:")
input("爱好:")
input("未来的目标:")
print("姓名:") print("姓名:")
print("小酷编程") print(as1)
print("爱好:") print("爱好:")
print("写代码") print(as2)
print("未来的目标:") print("未来的目标:")
print("成为顶尖程序员") print(as3)
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