Commit 30451f23 by BellCodeEditor

auto save

parent 678dc2e3
import math
num1=input('请输入是否加急(y)和重量(kg)(空格分隔)')
num2=num1.split(' ')
#print(num2)
price=0
if num2[-1]=='y':
price+=5
kg1=float(num2[0])
if kg1>1000:
price=price+(math.ceil((kg1-1000)/500))*4+8
else:
price+=8
print(price)
\ No newline at end of file
import math
num1=input('有多少个苹果(n),虫子几个小时吃一个苹果(x),经过多少个小时(y)')
num2=num1.split(' ')
num3=[]
for i in num2:
num3.append(int(i))
sum1=num3[0]-math.ceil(num3[2]/num3[1])
print(sum1)
\ No newline at end of file
import turtle
t=turtle.Pen()
t.left(45)
for i in range(4):
t.forward(100)
t.left(90)
turtle.done()
\ No newline at end of file
import turtle
t=turtle.Pen()
t1=['blue','black','red']
t2=['yellow','green']
t.goto(0,0)
for i in range(3):
t.pendown()
t.pensize(5)
t.pencolor(t1[i])
t.circle(50)
t.penup()
t.forward(100)
t.goto(50,-50)
for i in range(2):
t.pendown()
t.pensize(5)
t.pencolor(t2[i])
t.circle(50)
t.penup()
t.forward(100)
turtle.done()
\ No newline at end of file
import turtle
t=turtle.Pen()
t.goto(0,0)
t.left(45)
t.circle(200,steps=4)
t.penup()
t.goto(-80,80)
t.pendown()
t.circle(100,steps=4)
turtle.done()
\ No newline at end of file
import turtle
t=turtle.Pen()
screen=turtle.Screen()
screen.bgcolor('light blue')
t.write('春眠不觉晓,\n处处闻啼鸟。\n夜来风雨声,\n花落知多少。\n --洪铭',font=('Times',30,'normal'))
#t.hideturtle()
t.pensize(5)
t.pencolor('red')
t.penup()
t.goto(-100,100)
t.pendown()
t.left(45)
len=50
t.forward(2*len)
t.circle(len,180)
t.right(90)
t.circle(len,180)
t.forward(2*len)
turtle.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