My issue
def greet(name):
return f"Hello, {name}!"
def capitalize(text):
return text.upper()
def greet_and_capitalize(name):
# Update the code below this line
return name.greet()
Call the functions
name = "Alice"
final_result = greet_and_capitalize(name)
Display the results
print(“Final Result:”, final_result)
My code
def greet(name):
return f"Hello, {name}!"
def capitalize(text):
return text.upper()
def greet_and_capitalize(name):
# Update the code below this line
return name.greet()
# Call the functions
name = "Alice"
final_result = greet_and_capitalize(name)
# Display the results
print("Final Result:", final_result)
Learning course: Python with Data structures
Problem Link: Practice Problem in - CodeChef