Skip to content

Instantly share code, notes, and snippets.

@codecademydev
Created March 10, 2021 16:55
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 codecademydev/040c66ff7e45d0340c681c9344b8b767 to your computer and use it in GitHub Desktop.
Save codecademydev/040c66ff7e45d0340c681c9344b8b767 to your computer and use it in GitHub Desktop.
Codecademy export
# Write your add_exclamation function here:
def add_exclamation(word):
if len(word)<20:
word1 = word + '!'
return add_exclamation(word1)
else:
return word
# Uncomment these function calls to test your function:
print(add_exclamation("Codecademy"))
# should print Codecademy!!!!!!!!!!
print(add_exclamation("Codecademy is the best place to learn"))
#should print Codecademy is the best place to learn
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment