### textbook exercises ###

1. Exercise 9.15, page 315 -- see code for Sierpinski triangle in D2L: Materials / Content / Software / sierpinskirecursion.py

9.15 Modify the sierpinksi and drawTriangle functions to add color: Hint: Make each recursive call draw in a different color.

2. Exercise 10.19, page 343. Further details about this task: Within a class definition the constructor can take the number of sides -- not all die have 6 sides! The roll method has to be random, so the code needs to import random. So, that's a def of methods __init__ and __roll__. The __str__ method can be used to display the result.

Implement the __add__ method to allow you to concatenate two sentences together. Make sure your __add__ method returns a new instance of Sentence.

### Non-textbook task ###

4. Write a half-page summary of how Python compares / contrasts with another programming language with respect to object oriented programming. If you are not experienced with object oriented programming, you will have to do some research on the Internet. Include in your discussion some example code.

5. Write a small program that retrieves and prints device status information. The device could be a printer, a hard drive, memory, Android connected by BlueTooth, WiFi router, etc. See discussions on System Interaction and Hardware Interaction for ideas.

Remember to include code that runs any stand-alone modules or functions that you create. You may submit a single program that imports the various modules. This is a good way for you to test your code during development. In other words, submit a working program.

Academic Honesty!
It is not our intention to break the school's academic policy. Posted solutions are meant to be used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly complete the form. Please provide a valid email address and we will get back to you within 24 hours. Payment is through PayPal, Buy me a Coffee or Cryptocurrency. We are a nonprofit organization however we need funds to keep this organization operating and to be able to complete our research and development projects.