Skip to content

Instantly share code, notes, and snippets.

@codecademydev
Created April 22, 2020 11:53
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/80dc42b4268e00ae681a3f4dfd99784a to your computer and use it in GitHub Desktop.
Save codecademydev/80dc42b4268e00ae681a3f4dfd99784a to your computer and use it in GitHub Desktop.
Codecademy export
# Write your add_exclamation function here:
def add_exclamation(word):
words = word
if len(word) >= 20:
return word
else:
for i in range(20-len(word)):
words += "!"
return words
# 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