-
-
Save codecademydev/80dc42b4268e00ae681a3f4dfd99784a to your computer and use it in GitHub Desktop.
Codecademy export
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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