Basic example
Input
format_greeting('Alice', 30)
Output
Hello, Alice! You are 30 years old.
Name and numeric age are inserted into the template.
Full lesson preview
Combine text and values into a single formatted string using Python strings.
Problem statement
Task
Examples
Input
format_greeting('Alice', 30)
Output
Hello, Alice! You are 30 years old.
Name and numeric age are inserted into the template.
Input format
Output format
Constraints
Samples
Input
format_greeting('Bob', '25')
Output
Hello, Bob! You are 25 years old.
Age provided as a string is placed into the template unchanged.