Commit 10d81002 by BellCodeEditor

save project

parent 93e3add7
import random # file=open(r'C:\Users\Student-A08\Desktop\555.txt','a',encoding='utf-8')
player=input("请出拳:石头/剪刀/布") # file.write('小\n')
print("玩家出拳:"+player) # file.write('大\n')
list=["石头","剪刀","布"] # file.close()
a=random.choice(list)
print("计算机出拳:"+a) with.open(r'C:\Users\Student-A08\Desktop\555.txt','a',encoding='utf-8') as file1:
if player==computer: for data in file1:
print("平局") if '小'in data:
elif player=="石头"and computer=="剪刀": print("如果话里话外")
print("恭喜,你赢了") for data in file1:
elif player=="剪刀"and computer=="布" if '大'in data:
print("恭喜,你赢了) print("如果话里话外")
elif player==""and computer=="石头": \ No newline at end of file
print("恭喜你,你赢了")
else:
print("很遗憾,你输了")
\ No newline at end of file
print(3%2**3*4)
a=int(input("速度为?")) a=input(int"速度")
sb=100/a w=100/a
print(sb) print(w)
\ 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