Question: Using Python 3 Write a program that represents a popular kids toy that teaches them about different shapes and colors. Your toy should include: a
Using Python 3 Write a program that represents a popular kids toy that teaches them about different shapes and colors.
Your toy should include:
- a red square
- a blue circle
- a yellow semicircle
- a green pentagon
These shapes should be centered in a square formation on the canvas and should each have radii of 60 pixels. You should use only the circle() command to create all shapes. (Remember the extended parameters we learned about!)
Hint:
- Tackle this problem one shape at a time. You should write four different functions to keep your code as readable as possible!
- To draw a circle, do not use extended parameters. Ideally our circle would have an infinite number of points, and the only way to simulate this is to leave point values off completely.
- Your end result does not have to exaclty match the given solution, but should include all of the same features.
When I put in the following:
penup() setposition(100,40)
pendown() color("blue") begin_fill() circle(60) end_fill()
penup() setposition(-100,40)
pendown() color("red") begin_fill() circle(60,360,4) end_fill()
penup() setposition(-100,-160)
pendown() color("yellow") begin_fill() circle(60,180) end_fill()
penup() setposition(100,-160)
left(180) pendown() color("green") begin_fill() circle(60,360,5) end_fill()
I get an error that says I should have functions in the code
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
