#NOTE: the last line "input()" is only necessary when using the online interpreter #Problem 1 #To make a square that is 50 pixels on each side what do #you need to set x and y equal to? from turtle import * a=? b=? forward(a) left(b) forward(a) left(b) forward(a) left(b) forward(a) #Problem 2 # Assign values to c,d,e,and f to make a parallelogram that is 45 pixels # on one side and 100 pixels on the other as well as # and a circle that # is 35 pixels in radius from turtle import * c=? d=? e=? f=? g=? h=? forward(c) left(f) forward(g) left(d) forward(c) left(e) forward(g) circle(h) #Problem 3 #Fill in the variables with numbers that make your image #look like the image provided in the assignment. from turtle import * x = ? #this will be a number between 0-1 y= ? z = ? a = ? b = ? c = ? #hint: EXCEPT FOR a and x, all of the values will be between 40 and 100 #Do Not Change Anythhing below this line. penup() goto(-200,0) width(a) pencolor(0,1,0) pendown() forward(400) penup() goto(0,0) fillcolor(x,0,0) begin_fill() left(y) forward(b) right(y) forward(b+c) right(y) forward(b) end_fill() penup() goto(170,b) fillcolor(0,0,0) begin_fill() left(200) forward(c) left(z) forward(160) left(z) forward(c) end_fill() goto(75,0) begin_fill() setheading(y) forward(c) right(y) forward(40) right(y) forward(c) end_fill() goto(-150,140) fillcolor(1,1,0) begin_fill() circle(30) end_fill() hideturtle() input()
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)