Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

CodeSignal

Defining and Utilizing Functions in Go

via CodeSignal

Overview

Functions are fundamental to clean and effective coding. This course demystifies the process of creating and using functions in Go, covering everything from basic syntax and function parameters to understanding variable scope. By integrating these concepts, you'll be able to build more modular and error-resistant Go programs.

Syllabus

  • Unit 1: Diving Into Go Functions
    • Creating and Running a Simple Go Function
    • Modify the Greeting Function
    • Fixing the Greeting Function in Go
    • Invoking Your First Function in Go
    • Create a Function to Bid Farewell
  • Unit 2: Building upon Basic Functions with Go Function Parameters
    • Greet User by Name Using Function Parameters in Go
    • Enhancing Greeting Function with Multiple Parameters in Go
    • Writing a Personalized Greeting Function in Go
  • Unit 3: Exploring Return Values in Go Functions
    • Calculating Trip Cost Using Return Values in Go
    • Modify the Function to Return a Value
    • Dividing Numbers and Checking for Division with Zero
    • Calculating Total Transportation Cost in Go
    • Calculate Total Souvenir Budget
  • Unit 4: Introduction to Variable Scope: Local and Package-Level Variables in Go
    • Modifying Package-Level Variables in Go
    • Tracking Landmarks with Package-Level Variables in Go
  • Unit 5: Combining Functions to Solve Complex Problems in Go
    • Running and Understanding Combined Functions in Go
    • Evaluating Additional Travel Costs within Budget
    • Selecting Travel Destinations with Budget and Cost Constraints in Go
    • Fix the Bug in Choosing Countries Based on Budget in Go
    • Implementing a Function to Calculate Trip Costs in Go

Reviews

Start your review of Defining and Utilizing Functions in Go

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.