Commit bccb42dc by BellCodeEditor

save project

parent 971c4689
import turtle
pen=turtle.Pen()
pen.fillcolor("black")
pen.begin_fill()
pen.penup()
pen.goto(0,-200)
pen.pendown()
pen.circle(200,180)
pen.left(90)
pen.goto(0,-200)
pen.goto(0,0)
pen.right(90)
pen.end_fill()
pen.fillcolor("black")
pen.begin_fill()
pen.circle(100,180)
pen.end_fill()
pen.fillcolor("white")
pen.begin_fill()
pen.goto(0,0)
pen.circle(100,180)
pen.end_fill()
pen.pensize(3)
pen.circle(200,180)
pen.fillcolor("white")
pen.begin_fill()
pen.goto(0,-120)
pen.circle(30,360)
pen.end_fill()
pen.penup()
pen.fillcolor("black")
pen.begin_fill()
pen.goto(0,75)
pen.pendown()
pen.circle(30,360)
pen.end_fill()
pen.penup()
pen.goto(0,-200)
pen.pendown()
pen.circle(200,360)
turtle.done()
\ No newline at end of file
n=input()
print((20-len(n))//2*'='+n+(20-len(n))//2*'=')
s=input()
for i in s:
if i=="0":
print("零",end="")
elif i=="1":
print("一",end="")
elif i=="2":
print("二",end="")
elif i=="3":
print("三",end="")
elif i=="4":
print("四",end="")
elif i=="5":
print("五",end="")
elif i=="6":
print("六",end="")
elif i=="7":
print("七",end="")
elif i=="8":
print("八",end="")
elif i=="9":
print("九",end="")
n=int(input())
print(n+n)
\ No newline at end of file
s=input()
print()
dict_hero={'a':1,'b':2,'c':3}
print(dict_hero)
print(dict_hero['a'])
dict_hero['c']=4
dict_hero['d']=5
print(dict_hero)
import turtle
pen=turtle.Pen()
pen.penup()
pen.goto(-150,-200)
pen.pendown()
pen.goto(100,-200)
pen.left(90)
pen.goto(100,0)
pen.left(90)
pen.goto(-150,0)
pen.right(90)
pen.goto(-150,-200)
pen.fillcolor("blue")
pen.begin_fill()
pen.penup()
pen.goto(0,-100)
pen.pendown()
pen.circle(30,360)
pen.end_fill()
pen.fillcolor("blue")
pen.begin_fill()
pen.penup()
pen.goto(100,-100)
pen.pendown()
pen.circle(30,360)
pen.end_fill()
pen.fillcolor("blue")
pen.begin_fill()
pen.penup()
pen.goto(-90,-100)
pen.pendown()
pen.circle(30,360)
pen.end_fill()
turtle.done()
\ No newline at end of file
dict={'':3,'旺仔牛奶':4,'农夫山泉':1,'辣条':3,'巴西烤肉':2,'果冻':4,'乐事':5,'奥利奥':10,'巧克力':6}
k=input('你想买什么呀?')
if k in dict:
print('叮咚~您的'+k+'需要支付'+str(dict[k])+'元~')
else:
print('神奇百货暂未有你想要的物品,敬请期待~')
import turtle
pen=turtle.Pen()
pen.fillcolor("black")
pen.begin_fill()
pen.penup()
pen.goto(-200,-300)
pen.pendown()
pen.goto(300,-300)
pen.goto(300,200)
pen.left(180)
pen.goto(-200,200)
pen.left(90)
pen.goto(-200,-300)
pen.end_fill()
pen.fillcolor("red")
pen.begin_fill()
pen.penup()
pen.goto(50,-300)
pen.pendown()
pen.goto(300,-50)
pen.goto(50,200)
pen.goto(-200,-50)
pen.end_fill()
turtle.done()
\ No newline at end of file
import turtle
pen=turtle.Pen()
pen.pensize(3)
pen.penup()
pen.goto(0,-120)
pen.pendown()
pen.right(20)
pen.circle(140,90)
pen.right(-90)
pen.circle(140,90)
pen.right(216)
pen.right(20)
pen.circle(140,90)
pen.right(-90)
pen.circle(140,90)
pen.right(220)
pen.right(20)
pen.circle(140,90)
pen.right(-90)
pen.circle(140,90)
pen.right(216)
pen.right(20)
pen.circle(140,90)
pen.right(-90)
pen.circle(140,90)
pen.right(216)
pen.right(20)
pen.circle(140,90)
pen.right(-90)
pen.circle(140,90)
pen.fillcolor('pink')
pen.end_fill()
turtle.done()
\ No newline at end of file
a={'小张':70,'小王':80,'小李':90}
k=input('请输入姓名')
v=input('请输入成绩')
if k in a:
if int(v)>a[k]:
a[k]= int(v)
print(k+'涨高了,现在'+v+'分')
else:
print(k+'降低了,继续努力')
else:
a[k]=int(v)
print(k+'的成绩'+v+'分已上传')
weather={'北京':8,'上海':15,'广州':20,'深圳':21}
data=weather.pop("北京")
print(data)
print(weather)
a={'小张':70,'小王':80,'小李':90}
a.pop('小张')
print(a)
import turtle
pen=turtle.Pen()
pen.fillcolor("red")
pen.begin_fill()
pen.penup()
pen.goto(-180,-100)
pen.right(90)
pen.pendown()
pen.pensize(5)
pen.pencolor("green")
pen.circle(200,180)
pen.pensize(5)
pen.pencolor("black")
pen.left(90)
pen.goto(-180,-100)
pen.end_fill()
pen.hideturtle()
turtle.done()
\ No newline at end of file
import turtle
pen=turtle.Pen()
pen.penup()
pen.goto(0,-200)
pen.pendown()
pen.circle(200,180)
pen.left(90)
pen.goto(0,-200)
pen.left(135)
pen.goto(200,0)
pen.goto(0,200)
pen.end_fill()
pen.hideturtle()
turtle.done()
\ No newline at end of file
n=input()
print(n)
n=int(input())
if n%2==0:
print(0)
if n%2!=0:
print(1)
\ No newline at end of file
n=int(input())
sum=0
for i in range(1,n+1):
sum=sum+i
print(sum)
n=input()
print(len(n))
\ No newline at end of file
n=input()
print((15-len(n))*"*"+n)
\ 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