You've learned the basics of function creation and calling. Now let's practice recognizing the difference and building confidence with function syntax.
Engagement Message
Ready to put your function skills to the test?
Type
Fill In The Blanks
Markdown With Blanks
Complete this function definition and call:
Suggested Answers
- func
- displayMessage
- fmt
- Println
Type
Multiple Choice
Practice Question
Look at this code:
What happens when this program runs?
A. Nothing prints because the function isn't called B. "Welcome to Go!" prints once C. "Welcome to Go!" prints twice D. There's an error because showWelcome isn't defined
Suggested Answers
- A
- B - Correct
- C
- D
Type
Sort Into Boxes
Practice Question
Sort these code snippets based on whether they show correct Go function syntax or have errors.
Labels
- First Box Label: Correct Syntax
- Second Box Label: Has Errors
First Box Items
- func test() {}
- func display() {}
- func hello() {}
