Commit af749037 by BellCodeEditor

save project

parent 8565eb2b
Showing with 13 additions and 0 deletions
name=input('你叫什么名字呀')
power=int(input('你的臂力值是多少'))
list_hero=['猴三',10,'猴一',21,'猴二',22,'猴四',23,'猴队长',29,'猴五',28,'猴七',30,'猴六',50]
for i in range(len(list_hero)):
if i%2==1 and list_hero[i]>=power:
list_hero.insert(i-1,name)
list_hero.insert(i,power)
break
print(list_hero)
dict_hero={'猴三':10,'猴一':21,'猴二':22,'猴四':23,'猴队长':29,'猴五':28,'猴七':30,'猴六':50}
dict_hero[猴七]=32
print(dict_hero)
\ 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