Skip to content

Instantly share code, notes, and snippets.

@pamelafox
Created August 30, 2021 06:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pamelafox/bda4765c791b9643da3fa0c935d19867 to your computer and use it in GitHub Desktop.
Save pamelafox/bda4765c791b9643da3fa0c935d19867 to your computer and use it in GitHub Desktop.
World Translator
"""
Write a function named hello_world that:
* takes 1 argument, a language code (e.g. "es", "pt", "en")
* returns "Hello, World" for the given language
It should return English if an invalid language code is specified.
"""
def hello_world(language_code):
"""
>>> hello_world("en")
'Hello, World'
>>> hello_world("es")
'Hola, Mundo'
>>> hello_world("pt")
'Olá, Mundo'
"""
# YOUR CODE HERE
# I encourage you to add a favorite language and check it works in the console!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment