Simple Python Functions
This exercise is for collaborative work during class. Do not fill out early!
Sign in to Google to save your progress. Learn more
The Python program below prints four lines of text when it's run
def addGreen(phrase):
     return "green " + phrase

def addSmall(phrase):
     return "small " + phrase

def addCrooked(phrase):
     return "crooked " + phrase

if __name__ == '__main__':
     print addGreen("house")
     print addSmall("chicken")
     print addCrooked("street")
     print addSmall(addGreen("pickle"))
What's the first line printed? *
What's the last line printed? *
Suppose we added one print statement at the bottom of the program. Which line of code results in printing "crooked little green house"? *
What is a question you might ask about the code? *
Names and Netids below
Names (comma separated) *
netid *
netid (partner)
netid (partner)
netid (partner)
Submit
Clear form
Never submit passwords through Google Forms.
This content is neither created nor endorsed by Google. Report Abuse - Terms of Service - Privacy Policy