What do you want to save?
Add Code snippet
New code examples
-
Python 2022-03-24 22:35:23
turtle circle() python
import turtle t = turtle.Turtle() t.color(color) # choose a color t.begin_fill() # if you want it to be filled with color later t.circle(10) # the function "circle" and the radious. t.end_fill() # completing the filling of the circle. # try to ... Add solution -
Python 2022-03-24 20:30:38
python turtle
import turtle # imports it whateverYouWantToCallIt = turtle.Turtle() # adds it to the project #code whateverYouWantToCallIt.forward(10) # moves whateverYouWantToCallIt forward whateverYouWantToCallIt.color("purple") # color whateverYouWantToCall... Add solution -
Python 2022-03-08 05:55:03
how do you create a variable in python turtle
import turtle # imports it whateverYouWantToCallIt = turtle.Turtle() # adds it to the project #code whateverYouWantToCallIt.forward(10) # moves whateverYouWantToCallIt forward whateverYouWantToCallIt.color("purple") # color whateverYouWantToCall... Add solution -
Python 2022-02-15 10:50:03
how to make a tree by python
import turtle arrow=turtle.Turtle() arrow.color ("green") window=turtle.Screen() window.bgcolor("cyan") arrow.begin_fill() arrow.forward(100) arrow.setheading(120) arrow.forward(100) arrow.setheading(240) arrow.forward(100) arrow.sethe... Add solution -
Python 2022-02-03 11:18:00
python how to draw a circle
import turtle def draw_circle(turtle,color,size,x,y): turtle.penup() turtle.color(color) turtle.fillcolor(color) turtle.goto(x,y) turtle.pendown() turtle.begin_fill() turtle.circle(size) turtle.end_fill() square=turtle.Turtle() square.spee... Add solution -
Python 2022-02-02 23:31:25
make a pong game in python
#The best python pong game without pygame! import turtle a_wins = False b_wins = False # Set up the screen turtle.Screen() wn = turtle.Screen() wn.title("Ping Pong game by Timothy") wn.bgcolor("black") wn.setup(width=800, height=600... Add solution -
-
TypeScript 2022-01-31 12:01:28
2. Write a program to draw this. Assume the innermost square is 20 units per side, and each successive square is 20 units bigger, per side, than the one inside it.
import turtle wn = turtle.Screen() wn.bgcolor("lightgreen") tess = turtle.Turtle() def draw_square(t,size): for i in range(4): tess.forward(size) tess.left(90) size = 20 for j in range(3): tess.pensize(3) draw_square(... Add solution -
Python 2021-11-05 14:07:13
python turtle onkeypress
#Importing the module import turtle #The window creation window = turtle.Screen() #The turtle creation p = turtle.Turtle() p.color("black") p.penup() #the function def move(): p.forward(20) #The event listener turtle.listen() turtle.onkeyp... Add solution
Best helpers
Ranking is empty