Challenge: Writing First Function
Uppgift
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.
Lösning
Var allt tydligt?
Tack för dina kommentarer!
Avsnitt 6. Kapitel 4
single
Fråga AI
Fråga AI
Fråga vad du vill eller prova någon av de föreslagna frågorna för att starta vårt samtal
Suggested prompts:
Sammanfatta detta kapitel
Explain code
Explain why doesn't solve task
Awesome!
Completion rate improved to 1.67
Challenge: Writing First Function
Svep för att visa menyn
Uppgift
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.
Lösning
Var allt tydligt?
Tack för dina kommentarer!
Awesome!
Completion rate improved to 1.67Avsnitt 6. Kapitel 4
single