Challenge: Writing First Function
Task
Swipe to start coding
You are writing a simple function to generate a personalized greeting.
- Define a function called
greeting
that takes a parameter calledname
. - The function should return a greeting in the format:
"Hello, name!"
. - Use the
return
statement to ensure the function outputs the correct result.
Solution
Everything was clear?
Thanks for your feedback!
SectionΒ 6. ChapterΒ 4