Skip to content

Instantly share code, notes, and snippets.

@pamelafox
Created August 26, 2021 17:00
Show Gist options
  • Save pamelafox/f59619cc544a3f77f0645e7a38968d34 to your computer and use it in GitHub Desktop.
Save pamelafox/f59619cc544a3f77f0645e7a38968d34 to your computer and use it in GitHub Desktop.
Fortune Teller
"""
Why pay a fortune teller when you can just program your fortune yourself?
Write a function named tell_fortune that:
* takes 3 arguments: job title, partner's name, geographic location.
* returns a fortune of the form: 'You will be a {job_title} in {location} living with {partner}.
"""
def tell_fortune(job_title, location, partner):
"""
>>> tell_fortune('bball player', 'Spain', 'Shaqira')
'You will be a bball player in Spain living with Shaqira.'
>>> tell_fortune('farmer', 'Kansas', 'C3PO')
'You will be a farmer in Kansas living with C3PO.'
>>> tell_fortune('Elvis Impersonator', 'Russia', 'Karl the Fog')
'You will be a Elvis Impersonator in Russia living with Karl the Fog.'
"""
return '?'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment