Last active
February 17, 2019 13:42
-
-
Save qmmr/42f1d547e1b7b1784039ccadbc530dd3 to your computer and use it in GitHub Desktop.
Homework Assignment #2: Functions
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
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