diff --git a/diy1.py b/diy1.py new file mode 100644 index 0000000..5c355b0 --- /dev/null +++ b/diy1.py @@ -0,0 +1,19 @@ +# 玩家出拳qwq +choice = input("What is your choice?") +Choice = choice.title() +print("Player's choice is:"+Choice) +# 计算机出拳pwp +import random +list = ["Rock","Paper","Scissors"] +letter = random.choice(list) +print("Computer's choice is:"+letter) +#qwp +if Choice in list: + if Choice == letter: + print("哦耶,平局") + elif (Choice=="Rock" and letter =="Scissors") or (Choice=="Scissors" and letter =="Paper") or (Choice=="Paper" and letter =="Rock") : + print("恭喜你赢了") + else: + print("很遗憾你没了") +else: + print("You entered the wrong.") \ No newline at end of file