My issue
As I my code returns as the desired output, but it shows status as wrong answer. please help me to find the error in my code.
def greet(name):
return f"Hello, {name}!"
def capitalize(text):
return text.upper()
def greet_and_capitalize(name):
greets = greet(name)
capital = capitalize(greets)
print(“Greeting:”,greets)
print(“Capitalized Greeting:”,capital)
return capital
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):
greets = greet(name)
capital = capitalize(greets)
print("Greeting:",greets)
print("Capitalized Greeting:",capital)
return capital
# 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: CodeChef: Practical coding for everyone