Commit e6a483d5 by BellCodeEditor

auto save

parent d8fc6027
Showing with 32 additions and 18 deletions
import random shu=int(input("输入一个三位数:"))
player=input("请输入(石头/剪刀/布):") b=shu//100
print("玩家出拳"+player) s=shu%100//10
list=["石头","剪刀","布"] g=shu%10
computer=random.choice(list) print("百位:",b,"十位:",s,"个位:",g)
print("电脑出拳"+computer) \ No newline at end of file
if player in list:
if player==computer:
print("平局")
elif (player=="石头" and computer=="布") or (player=="布"and computer=="剪刀") or (player=="剪刀"and computer=="石头"):
print("玩家输")
else:
print("玩家赢")
else:
print("输入错误")
\ No newline at end of file
import turtle
turtle.hideturtle()
turtle.pencolor("red")
turtle.pensize(2)
turtle.goto(0,-100)
turtle.circle(100)
turtle.goto(0,100)
turtle.penup()
turtle.goto(-100,0)
turtle.pendown()
turtle.forward(200)
turtle.done()
\ No newline at end of file
print( "a", end=" " )
print("b", end=" " )
is
N=int(input("请输入奶牛的头数")) N=int(input("请输入奶牛的头数"))
s=20*7*N s=20*7*N
print(s) print(N,"头奶牛七可以产",s,"千克的牛奶")
\ No newline at end of file \ 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