Commit 9cca1adb by BellCodeEditor

auto save

parent 992f64c9
Showing with 69 additions and 15 deletions
import random
player = input("请出拳(石头/剪刀/布):")
print("玩家出拳:"+player)
list = ["石头","剪刀","布"]
computer = random.choice(list)
print("计算机出拳:"+computer)
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("输入错误")
a={1:"星期1",2:"星期2",3:"星期3",4:"星期4",5:"星期5",6:"星期6",7:"星期日"}
while True:
b=int(input("请输入一个数字"))
print(b,"--",a.get(b))
a=int(input("请输入乌龟的速度?"))
b=100/a
print("乌龟能够追上兔子所需的时间是:",b,"秒")
import turtle as t
t.clear()
t.speed(1)
t.color("black","black")
t.penup()
t.goto(0,0)
t.begin_fill()
t.pendown()
t.fd(100)
t.right(90)
t.fd(100)
t.right(90)
t.fd(100)
t.right(90)
t.fd(100)
t.right(90)
t.end_fill()
t.penup()
t.goto(100,0)
t.pendown()
t.fd(100)
t.right(90)
t.fd(100)
t.right(90)
t.fd(100)
t.right(90)
t.fd(100)
t.right(90)
t.penup()
t.goto(100,-100)
t.begin_fill()
t.pendown()
t.fd(100)
t.right(90)
t.fd(100)
t.right(90)
t.fd(100)
t.right(90)
t.fd(100)
t.right(90)
t.end_fill()
t.penup()
t.goto(0,-100)
t.pendown()
t.fd(100)
t.right(90)
t.fd(100)
t.right(90)
t.fd(100)
t.right(90)
t.fd(100)
t.right(90)
t.hideturtle()
t.done()
\ No newline at end of file
a=input("输入一个日期:")
months=["January","February","March","April","May","june","july","August","September","October","November","December"]
list=a.split("/")
list[0]=months[int(list[0])-1]
print(list[0]+" "+list[1]+","+list[2])
\ 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