73.5k 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
8.4k 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
8.0k 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
8.7k points

Related questions

asked Oct 2, 2023 196k views
David Kanarek asked Oct 2, 2023
by David Kanarek
8.4k points
1 answer
0 votes
196k views
asked Oct 16, 2024 145k views
Galatians asked Oct 16, 2024
by Galatians
8.4k points
1 answer
2 votes
145k views