Commit 78aaf602 by BellCodeEditor

save project

parent b0871040
Showing with 17 additions and 20 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':
break
else:
#computer try:
computer_ansser=random.choice(Ansser) unit=int(unit)
print("computer's:"+computer_ansser) except:
print("要输入int")
#compare else:
if computer_ansser=="stong" and player_ansser=="paper": total.append(unit)
print("You win!") print('结束')
elif computer_ansser=="sizzer" and player_ansser=="stong": print(total)
print("You win!") new_input()
elif computer_ansser=="paper" and player_ansser=="sizzer": \ No newline at end of file
print("You win!")
elif computer_ansser==player_ansser:
print("We're all win!")
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