Python Homework #5

Instructions:

Here's some string functions to work on. Remember: For all of these, make sure you return the result, not just print it. You should make sure you test each function on at least 2 inputs.
  1. Write a function quoteAndUnderline(someText). This should take a string parameter in someText and return a version of the text with quotes and an underline. For example: print(quoteAndUnderline("The Stuyvesant Spectator")) should produce the following output:
    "The Stuyvesant Spectator"
    --------------------------
    

  2. Write a function makeRectangle(width, height). This should take an integer width and height, and return a string representing an appropriately sized rectangle For example, print(makeRectangle(8,3)) should produce the following output:
    ********
    ********
    ********
    
  3. Write a function makeTriangle(size). This should take an integer size and return a string representing a triangle on its side, with its height equal to size. For example, print(makeTriangle(3)) should produce the following output:
    *
    **
    ***
    **
    *
    

Challenge problem:

Write a function makeChristmasTree(trunkHeight,trunkWidth, treeSize). This should draw a christmas tree on its side; e.g.: print(makeChristmasTree(2, 1, 3) should output:
  #
  ##
==###*
  ##
  #
(Note: since the trunk is centered and mirrored, the trunk should actually be 2*trunkwidth-1 characters across, similar to the width of the triangle)