Commit 78aaf602 by BellCodeEditor

save project

parent b0871040
Showing with 18 additions and 21 deletions
import random def new_input():
Ansser=["stong","sizzer","paper"] total=[]
#player while True:
player_ansser=input("player's:(stong/sizzer/paper)") unit=input("jiage:")
if unit=='q':
#computer break
computer_ansser=random.choice(Ansser) else:
print("computer's:"+computer_ansser)
try:
#compare unit=int(unit)
if computer_ansser=="stong" and player_ansser=="paper": except:
print("You win!") print("要输入int")
elif computer_ansser=="sizzer" and player_ansser=="stong": else:
print("You win!") total.append(unit)
elif computer_ansser=="paper" and player_ansser=="sizzer": print('结束')
print("You win!") print(total)
elif computer_ansser==player_ansser: new_input()
print("We're all win!") \ No newline at end of file
else:
print("You lose.")
\ 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