def shout_echo(word1, echo=1): # Define shout_echo
"""Concatenate echo copies of word1 and three exclamation marks at the end of the string."""
# Initialize empty strings
echo_word = ''
shout_words = ''
# Add exception handling with try-except
try:
echo_word = word1 * echo
shout_words = echo_word + '!!!'
except:
print("word1 must be a string and echo must be an integer.")
return shout_words
shout_echo("particle", echo="accelerator")
def shout_echo(word1, echo=1): # Define shout_echo
"""Concatenate echo copies of word1 and three exclamation marks at the end of the string."""
# Raise an error with raise
if echo < 0:
raise ValueError('echo must be greater than or equal to 0')
echo_word = word1 * echo
shout_word = echo_word + '!!!'
return shout_word
shout_echo("particle", echo=5)