Commit 173770a9 by BellCodeEditor

save project

parent ea9ee4bf
Showing with 13 additions and 16 deletions
person=input("玩家出拳")
import random import random
key_message='' list=["石头","剪刀","布"]
mess = "afasadf" computer=random.choice(list)
key = "abcdefgh使用编程实现位移替换加密,制作密码机关真是太好玩了哈哈!" print("计算机出拳"+computer)
message = "诺依,周末一起去看动漫展吧!" if person==computer:
for i in message: print("平局")
str1 = i elif person=="布" and compuyer=="石头":
str2 = random.choice(key) print("你赢了")
str3 = random.choice(key) elif person=="石头" and compuyer=="剪刀":
text = str1 + str2 + str3 print("你赢了")
key_message=key_message+text elif person=="剪刀" and compuyer=="布":
a = random.randint(0,len(key_message)) print("你赢了")
keya = list(key_message) else:print("你输了")
keya.insert(a,mess)
keyb="".join(keya)
print(keyb)
\ 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