Question: I'd like to create a program that generates random shapes(rectangles and circles) in python . However, I don't want to use turtle. I'd like to

I'd like to create a program that generates random shapes(rectangles and circles) in python. However, I don't want to use turtle. I'd like to enter a drawing file name to create and then have the user enter the number of shapes to make.

For example, "Enter the drawing file name: draw1.txt", "Enter the number of shapes to make: 15"

This will write 30 shape lines to the file draw1.txt.

The lines should be written similar to below:

Circle; 80, 72; 15; 32, 208, 86 Rectangle; 145, 106; 421, 274; 32, 208, 205

Thank you.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!