Commit 0fa324b8 by BellCodeEditor

auto save

parent c1f6aa03
Showing with 33 additions and 11 deletions
def new_input():
total = []
while True:
unit= input("请输入:")
if unit== 'q':
break
else:
total.append(unit)
print(total)
new_input()
\ No newline at end of file
import turtle
# 设置画布大小
turtle.setup(400, 400)
# 创建画笔
pen = turtle.Pen()
pen.width(20)
# 设置起始位置
pen.penup()
pen.goto(-50, 100)
pen.pendown()
# 绘制Z形图形
pen.forward(200)
pen.right(135)
pen.forward(280)
pen.left(135)
pen.forward(200)
# 隐藏画笔
pen.hideturtle()
# 关闭画布
turtle.done()
\ No newline at end of file
size=int(input("请输入正方形的边长"))
a=4*size
b=size*size
print("正方形的周长是:"+str(a))
print("正方形的面积是:"+str(b))
\ 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