python 2
As defined on pp. 449 to 468 in Ch. 17, "Object-Oriented Programming," of Introduction to Computing and Programming in Python, a Turtle is an object from the class Turtle with the following features:
- Every turtle understands the same methods.
- Every turtle has the same fields or instance variables.
- Every turtle has a heading, body color, pen color, and X and Y position.
Yet, each turtle can have its own values for these fields.
Develop a script containing three new methods for the Turtle class as follows:
- Add a method to the Turtle class to draw a rectangle given a certain width and height.
- Add a method to the Turtle class to draw a simple house. It can have a rectangle for the house and an equilateral triangle as the roof.
- Add a method to the Turtle class to draw a street of houses.
Submit the copied and pasted code into a document and include a screen shot of it working on your own computer system.
7 years ago 8
Answer(1)
Purchase the answer to view it
NOT RATED
- DrawingShapes.docx
other Questions(10)
- cases
- Essay
- geniusy_2006
- Application 3- due 12pm easatern time
- For Bob Company, variable costs are 61% of sales, and fixed costs are $171,000. Management’s net income goal is $91,899. Compute the required sales in dollars needed to achieve management’s target net income of $91,899.
- Transitioning From a Task Focus to Knowledge Work
- Accounting work
- A jet airliner
- CRITICAL THINKING
- Hi I have an anssignment on illustrator program so could you help me and also he needs that on friday after tommorw