Skip to content

Instantly share code, notes, and snippets.

@qmmr
Last active February 17, 2019 13:42
Show Gist options
  • Save qmmr/42f1d547e1b7b1784039ccadbc530dd3 to your computer and use it in GitHub Desktop.
Save qmmr/42f1d547e1b7b1784039ccadbc530dd3 to your computer and use it in GitHub Desktop.
Homework Assignment #2: Functions
"""
pirple.com/python
Homework Assignment #2: Functions
Create three functions that return song attributes.
Bonus: Create a function that returns Boolean value.
"""
def album():
return "News of the World"
def artist():
return "Queen"
def title():
return "We Are the Champions"
def likeArtist(like = True):
return like
print(artist())
print(title())
print(album())
# If not given argument the likeArtist will return True by default
print(likeArtist())
# In this case we want to return True
print(likeArtist(False))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment