# Author:Xyw
# -*- coding = utf-8 -*-
# @Time : 2021/2/25 11:40
# @Author : 10259026
# @Site :
# @File : finger-guessing.py
# @Software: PyCharm
import random
print ("Hello, world")
other = random.randint(0, 2)
print("Please input your finger, jiandao(0), chuizi(1), bu(2):")
your = int(input())
print("your input is:", your, ", other is", other)
if your < 0 or 2 < your:
print("you input wrong")
exit()
if your == other:
print("ping ju")
elif your == 0:
if other == 1:
print("you lose")
elif other == 2:
print("you win")
elif your == 1:
if other == 0:
print("you win")
elif other == 2:
print("you lose")
elif your == 2:
if other == 1:
print("you win")
elif other == 0:
print("you lose")
Python学习-实现猜拳
最新推荐文章于 2023-05-23 18:06:36 发布