Commit f12849b4 by BellCodeEditor

auto save

parent 1e8a4976
# 持家小能手 (利用自动更新成绩程序的逻辑完成这个新项目)
# 如果输入的水果价钱比字典中的低,则替换掉,反之则不更新
cost= {'苹果':5.2,'山竹':12.9,'香蕉':2.4,'荔枝':15,'葡萄':9.3,'桂圆':8,'蓝莓':10,'李子':8}
k=input('请输入水果名称:')
v=input('请输入水果价钱:')
if k in cost:
if int[k]>v:
cost[k]=float(v)
print(k+'降价了,现价'+v+'元')
else:
print(k+'涨价了,我们不买')
else:
cost[k] = float(v)
print(k+'的价钱'+v+'元已上传~')
import turtle as t
t.penup()
t.goto
\ No newline at end of file
import turtle as t
import random
t.colormode(255)
for i in range(20):
red=random.randint(0,255)
green=red=random.randint(0,255)
blue=red=random.randint(0,255)
x=random.randint(-220,220)
y=random.randint(0,220)
t.penup()
t.goto(x,y)
t.pendown()
t.color(red,green,blue)
t.begin_fill()
t.circle(30)
t.end_fill()
t.right(90)
t.forward(30)
t.left(90)
t.done()
\ No newline at end of file
import turtle as t
t.pensize(10)
t.penup()
t.goto(0,0)
t.color('black')
t.pendown()
t.circle(70)
t.penup()
t.goto(-160,0)
t.color('blue')
t.pendown()
t.circle(70)
t.penup()
t.goto(160,0)
t.color('red')
t.pendown()
t.circle(70)
t.penup()
t.goto(-80,-60)
t.color('yellow')
t.pendown()
t.circle(70)
t.penup()
t.goto(80,-60)
t.color('green')
t.pendown()
t.circle(70)
t.done()
\ No newline at end of file
import turtle as t
import turtle as t
t.color('red')
t.speed(0)
for i in range(9999):
t.left(0.5)
t.circle(100)
t.done()
\ No newline at end of file
import turtle as t
import turtle as t
t.penup()
t.goto(0,-200)
t.pendown()
t.begin_fill()
t.circle(200)
t.color('red')
t.end_fill()
t.penup()
t.goto(0,-150)
t.pendown()
t.begin_fill()
t.circle(150)
t.color('white')
t.end_fill()
t.penup()
t.goto(0,-100)
t.pendown()
t.begin_fill()
t.circle(100)
t.color('red')
t.end_fill()
t.penup()
t.goto(0,-50)
t.pendown()
t.begin_fill()
t.circle(50)
t.color('blue')
t.end_fill()
t.penup()
t.goto(-40,10)
t.pendown()
t.color('white')
t.begin_fill()
for i in range(5):
t.forward(80)
t.right(144)
t.end_fill()
t.done()
\ 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