Commit d6ede28d by BellCodeEditor

auto save

parent 0e362b76
Showing with 63 additions and 4 deletions
i = 1 # 行 #这是单行注释
for j in range(1,10): '''
print(i,'x',j,'=',(i*j)) 这是多行注释
\ No newline at end of file '''
# #输入爸爸的身高
# f = float(input("请输入爸爸的身高:"))
# #输入妈妈的身高
# m = float(input("请输入妈妈的身高:"))
# #输入性别系数
# s = float(input("请输入性别系数 1:男孩、-1:女孩:"))
# #计算孩子的身高
# z = (m+f+(13*s))/2
# #输出孩子的身高
# print("孩子的身高为:",z)
# #求长方形的面积
# #a代表长方形的长
# a = int(input("请输入长方形的长:"))
# #b代表长方形的宽
# b = int(input("请输入长方形的宽:"))
# #c代表面积
# c = a*b
# print("长方形的面积为:",c)
# #买本子
# #输入钱
# a = int(input("请输入你身上的钱有多少:"))
# #输入单价
# dj = int(input("请输入本子的单价:"))
# #输入买了多少
# sl = int(input("请输入买了多少本:"))
# #计算买本的钱数
# zj = dj * sl
# #比较是否够买,够输出True 不够输出FALSE
# print(a>=zj)
# #画四个圆
# import turtle
# turtle.circle(40)
# turtle.circle(-40)
# turtle.forward(80)
# turtle.circle(40)
# turtle.circle(-40)
# turtle.done()
import turtle
pen_color=['red','blue','orange','green']
length=15
jd=90
i=1
n=int(input('请输入一共画出多少条边'))
while i<n+1:
turtle.pencolor(pen_color[i%4])
turtle.forward(length)
turtle.left(jd)
length=length+5
i=i+1
turtle.done()
05 09 16 25 26 33+ 03 07
\ 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