Commit 490b3a67 by BellCodeEditor

save project

parent c07a02a5
Showing with 14 additions and 3 deletions
# 玩家出拳 # 玩家出拳
name= "Tony" name = "Tony"
choice = input("Rock/Paper/Scissor") choice = input("Rock/Paper/Scissor")
print(name+" Choose"+choice) print("You choose: "+choice)
\ No newline at end of file import random
list = ["Rock","Paper","Scissor"]
computer = random.choice(list)
print("Computer choose "+computer)
if choice == computer:
print("Tie!")
elif (choice=="Rock" and computer=="Scissor") or (choice=="Paper" and computer=="Rock") or (choice=="Scissor" and computer=="Paper"):
print("You win "+name+", good job :)")
else:
print("You lost... good try though.")
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