Commit 8f00f08e by BellCodeEditor

auto save

parent 7434875a
Showing with 25 additions and 21 deletions
"""
使用turtle模块画图
每次移动都增加画笔移动的长度,并旋转91°,重复执行300次,查看效果
"""
import turtle
pen = turtle.Pen()
screen = turtle.Screen()
screen.bgcolor("light pink")
colors=["white","blue","violet","cyan"]
# 请创造师在下面接着创作
distance=1
pen.speed(1000)
for i in range(1,300):
pen.pencolor(colors[i%4])
pen.forward(i)
pen.right(91)
# 隐藏画笔,保存画布
pen.hideturtle()
turtle.done()
fenshu = []
for i in range(5):
a = input("请输入你的分数:")
if 0 <= int(a) <= 100:
fenshu.append(int(a))
else:
print("请输入零到一百之间的数")
c = 0
for b in fenshu:
c += b
print(int(round(c/len(fenshu),0)))
\ No newline at end of file
a = int(input("请输入一个正整数:"))
b = int(input("请输入另一个正整数:"))
n=0
gbs = 0
while True:
if a - b == 1 or b - a == 1:
gbs = a * b
print(gbs)
break
if a * n == b * n:
gbs = a*n
print(gbs)
break
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