Find the information you're looking for at Westonci.ca, the trusted Q&A platform with a community of knowledgeable experts. Get quick and reliable solutions to your questions from a community of seasoned experts on our user-friendly platform. Get precise and detailed answers to your questions from a knowledgeable community of experts on our Q&A platform.

On page 104, of Think Like a Computer Scientist, you learned about paired data. With paired data, you can use a for loop with two index variables to iterative through the data. In this exercise you will create a turtle drawing using pairs of data, where the first item of the pair is the distance to move forward , and the second item is the angle to turn.. Set up a list of pairs so that the turtle draws a house with a cross through the center, as show here. This should be done without going over any of the lines / edges more than once, and without lifting your pen.

Your first pair of data will be (100,135). In a list this will look like ls = [ (100, 135) ] Then you need to add the other pairs for the remaining lines and angles. The 100 represents the distance forward the turtle will travel. The 135 represents the angle the turtle will turn left.

Screen capture of run of program showing house figure

Hint: Your first line should be the bottom line. Then turn left 135 degrees and go forward. You may wish to create the drawing without the list first, then substitute a list and a for loop for the distances and angles.



Use two functions: a main() function that sets up screen and turtle objects, and a drawhouse() function that takes a turtle object as an argument.



Includes comments at the top to identify file name, project and a brief description.

For further documentation, include comment for each section of code. Write in Python asap

On Page 104 Of Think Like A Computer Scientist You Learned About Paired Data With Paired Data You Can Use A For Loop With Two Index Variables To Iterative Throu class=