Skip to content

Instantly share code, notes, and snippets.

@surfgreendev
Created November 22, 2022 11:45
Show Gist options
  • Select an option

  • Save surfgreendev/dad4396b8a7d332c1008d9a759d9d37c to your computer and use it in GitHub Desktop.

Select an option

Save surfgreendev/dad4396b8a7d332c1008d9a759d9d37c to your computer and use it in GitHub Desktop.
"""
City Names: Write a function called city_country() that takes in the name
of a city and its country. The function should return a string formatted like this:
"Santiago, Chile"
Call your function with at least three city-country pairs, and print the value
that’s returned
"""
"""
Album: Write a function called make_album() that builds a dictionary
describing a music album. The function should take in an artist name and an
album title, and it should return a dictionary containing these two pieces of
information. Use the function to make three dictionaries representing different
albums. Print each return value to show that the dictionaries are storing the
album information correctly.
Add an optional parameter to make_album() that allows you to store the
number of tracks on an album. If the calling line includes a value for the number
of tracks, add that value to the album’s dictionary. Make at least one new
function call that includes the number of tracks on an album.
"""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment