diff --git a/diy1.py b/diy1.py new file mode 100644 index 0000000..32a3cfd --- /dev/null +++ b/diy1.py @@ -0,0 +1,16 @@ +# 玩家出拳 +player=input("赶紧给老子出拳,石头,剪刀,还是布,赶紧的") + +import random +list=["石头","剪刀","布"] +PC=random.choice(list) +while player not in list: + player=input("别闹,好好玩") +print("哦吼,你竟然出"+player) +print("老子选的是"+PC) +if PC==player: + print("平局") +elif (player=="石头"and PC=="剪刀")or(player=="剪刀"and PC=="布")or(player=="布"and PC=="石头"): + print("今日,我虽死,但还是西楚霸王!!!") +else: + print("哦吼,我赢了") \ No newline at end of file