73.4k views
4 votes
Enthusiasm codehs 7.6.4 Write a function called add_enthusiasm that takes a string and returns that string in all uppercase with an exclamation point added.

User Sayooj V R
by
3.7k points

2 Answers

6 votes

Final answer:

To write a function called add_enthusiasm that takes a string and returns that string in all uppercase with an exclamation point added, you can use Python code.

Step-by-step explanation:

To write a function called add_enthusiasm that takes a string and returns that string in all uppercase with an exclamation point added, you can use the following Python code:

def add_enthusiasm(string):
return string.upper() + '!'

This function takes a string as input, converts it to uppercase using the upper() method, and then concatenates an exclamation point to the end of the string. Here's an example usage:

result = add_enthusiasm('hello')
print(result) # Output: 'HELLO!'

User Mcky
by
3.3k points
3 votes

Answer:

Hope this help

Step-by-step explanation:

def add_enthusiasm(string):

return string.upper() + "!"

print add_enthusiasm("hello")

User Peteyuan
by
4.1k points