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
greeting=greet(name)
return capitalize(greeting)
Call the functions
name = “Alice”
final_result = greet_and_capitalize(name)
Display the results
print(“Final Result:”, final_result)
"What is the use of f in the 1st line?
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
greeting=greet(name)
return capitalize(greeting)
# Call the functions
name = "Alice"
final_result = greet_and_capitalize(name)
# Display the results
print("Final Result:", final_result)
Learning course: Learn Python
Problem Link: CodeChef: Practical coding for everyone