Commit bd75d488 by BellCodeEditor

save project

parent 67b4a313
Showing with 38 additions and 2 deletions
# 玩家出拳 name=input('你叫啥名啊?')
\ No newline at end of file power=int(input('你臂力多少啊?'))
list_hero=['猴三',10,'猴一',21,'猴五',22,'猴队长',29,'猴七',30]
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)
\ No newline at end of file
dict_hero={'猴三':10,'猴一':21,'猴五':22,'猴队长':29,'猴七':30}
print(dict_hero)
\ No newline at end of file
import random
key="sdjhfhohosdf"
message="诺依,周末一起玩!"
text=""
m=""
for i in message:
    str1=i
    str2=random.choice(key)
    str3=random.choice(key)
    text=strl+str2+str3
    m += text
li_m=list(m)
index=random.randint(0,len(li_m))
li_m.insert(index,"fjoirj")
final_m="".join(li_m)
print(final_m)
\ No newline at end of file
dic_hero={"赵雄":20,"关羽":40,"刘备":60}
dic_hero["张飞"]=50
print(dic_hero)
if"刘备"in dic_hero:
print(dic_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