Question
I need help writing this code in python. Write a function called square with two parameters, x and y. The function should then use turtle
I need help writing this code in python.
Write a function called square with two parameters, x and y. The function should then use turtle graphics to draw a filled in square of size 20 pixels at the x and y point. You will not set the color of the turtle in the function, that will be done in the main program below. You need to use a loop in your function solution.
Write a program that will call the square function and print 20 random colored squares at random x/y points on the turtle graphics screen. The random x and y points should be between -100 and 100. ou need to use a loop in your main program solution. Your output should look similar to this Sample Run:
Python Turtle Graphics Python Turtle GraphicsStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started