code
import turtle import math turtle.speed(0) # 画一个平方的函数 turtle.penup() turtle.goto(-100, 0.01*100*100) turtle.pendown() for i in range(-100, 100): turtle.goto(i, 0.01*i*i) turtle.penup() turtle.goto(-160, 0) turtle.pendown() turtle.goto(160, 0) turtle.write("x", font=("宋体",15)) turtle.goto(150, 10) turtle.goto(160, 0) turtle.goto(150, -10) turtle.penup() turtle.goto(0, -160) turtle.pendown() turtle.goto(0, 160) turtle.write("y", font=("宋体",15)) turtle.goto(-10, 150) turtle.goto(0, 160) turtle.goto(10, 150) turtle.hideturtle() turtle.done()