Skip to content

Instantly share code, notes, and snippets.

@MuddyBootsCode
Created May 14, 2016 14:30
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 MuddyBootsCode/7eff60a3411df2aed26eecbef7f982e2 to your computer and use it in GitHub Desktop.
Save MuddyBootsCode/7eff60a3411df2aed26eecbef7f982e2 to your computer and use it in GitHub Desktop.
Practice Python - Character Input
myName = str(input('Hello what is your name? \n'))
myAge = int(input('Well ' + myName + ' I know it\'s a little rude but can you tell me how old you are? \n'))
century = 100 - myAge
print ('Well ' + myName + ' did you know that in ' + str(century) + ' years, you\'ll be 100 years old?\n')
messageRepeat = int(input(myName + ' would you mind giving me another number?\n'))
print (('Well ' + myName + ' did you know that in ' + str(century) + ' years, you\'ll be 100 years old?\n') * messageRepeat)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment