-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
44 changed files
with
1,985 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Lessons and practices |
50 changes: 50 additions & 0 deletions
50
13.Go-Programming-for-Beginners/Lesson 1: Getting Started with Go Programming Language/1.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
Getting Started with Go Programming Language | ||
This course provides an introduction and basic understanding of the Go programming language. Participants will consolidate their understanding of key Go Syntax, scripting, and problem-solving functionalities. | ||
Lessons and practices | ||
Lesson 1: Getting Started with Go: Syntax and Your First Program | ||
Running Your First Go Program | ||
Embarking on Your Go Odyssey | ||
Debugging Go Syntax Errors | ||
Welcome Aboard: Your First Go Program | ||
Lesson 2: Understanding Variables and Constants in Go | ||
Exploring Go: Variables and Constants of Our Planet | ||
Defining and Using Constants in Go | ||
Navigating Go Variables: Earth's Orbit and Solar System Count Debugging Challenge | ||
Defining Constants in Go: The Speed of a Cheetah | ||
Understanding Variables and Constants in Go | ||
Discovering a New Planet: Update the Variable | ||
Lesson 3: Understanding Basic Data Types in Go | ||
Go Data Types in Action: System Performance Evaluation | ||
Fuel Tank Precision Update | ||
System Report Generator Debugging | ||
Data Center Resource Calculation in Go | ||
Lesson 4: Understanding Go Comparison Operators: A Dive into Conditional Logic | ||
Determining the Need for Refueling on Our Space Journey | ||
Assessing Submarine Safety: Critical Depth Check | ||
Submarine Speed Comparison | ||
Add Comparison Operators to the Spaceship Program | ||
Voyage Calculations: Charting Distances to Venus and Neptune in Go | ||
Lesson 5: Mastering Arithmetic and Logical Operations in Go | ||
Election Vote Counting and Validation in Go | ||
Exploring Integer Overflow in Go | ||
Pre-Launch Logical Check Correction | ||
Galactic Arithmetic and Logic in Go | ||
Galactic Fuel Management Calculation | ||
Lesson 6: Understanding Data Type Conversion in Go | ||
Temperature Conversion in Go: Celsius to Fahrenheit | ||
Go Data Type Conversion Challenge: Rounding Planetary Distances | ||
Convert Temperature Reading to String for Logging in Go | ||
Galactic Data Type Conversion Challenge | ||
Add Asteroid Size Conversion to String in Go | ||
Lesson 7: Navigating Go's Conditional Cosmos: Steering Through if-else and Beyond | ||
Exoplanet Habitat Classification Challenge | ||
Diagnosing the Weather Station's Temperature Logic | ||
Weather Report: Programming Conditional Statements in Go | ||
Satellite Orbit Adjustment Decision Based on Fuel Level | ||
Add Orbit Classification to the Cosmic Body Identifier | ||
Lesson 8: String Manipulation in Go: Mastering Concatenation Operations | ||
Exploring String Formatting in Go | ||
String Building with Go's Builder | ||
Text Formatting with String Concatenation in Go | ||
Formatting Strings with fmt.Printf in Go | ||
Add Score Display with Custom Message Using String Formatting in Go |
148 changes: 148 additions & 0 deletions
148
...ogramming Language/Lesson 1: Getting Started with Go: Syntax and Your First Program.ipynb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,148 @@ | ||
{ | ||
"cells": [ | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"# Lesson 1: Getting Started with Go: Syntax and Your First Program\n", | ||
"\n", | ||
"# Introduction\n", | ||
"\n", | ||
"Hello, future programmers! Are you ready to dive into a new programming adventure? Today, we'll be exploring the basics of Go programming — syntax and comments — where you'll write your first, simple Go program.\n", | ||
"\n", | ||
"Go, also known as Golang, is a statically typed, compiled language developed at Google. It's known for its simplicity, efficiency, and ease of use. Notably, Go is widely used for concurrent programming, thanks to its advanced features such as **Goroutines** and **Channels**.\n", | ||
"\n", | ||
"Just as English has rules that we call grammar, Go has its own set of regulations known as **syntax**. Let's get started!\n", | ||
"\n", | ||
"---\n", | ||
"\n", | ||
"## Go Syntax Basics\n", | ||
"\n", | ||
"In Go, we use statements to perform actions. These are usually terminated by a new line or a semicolon (`;`). The semicolon at the end of the statement is optional and rarely used. Go uses curly braces (`{ }`) to group statements into blocks.\n", | ||
"\n", | ||
"Take a look at this simple Go syntax example:\n", | ||
"\n", | ||
"```go\n", | ||
"package main\n", | ||
"\n", | ||
"import \"fmt\"\n", | ||
"\n", | ||
"func main() {\n", | ||
" fmt.Println(\"Hello, Go World!\")\n", | ||
"}\n", | ||
"```\n", | ||
"\n", | ||
"In this example:\n", | ||
"- `package main` specifies that it's the main entry point of the Go application.\n", | ||
"- `import \"fmt\"` instructs Go to use the `fmt` library for formatted I/O operations.\n", | ||
"- In the `main` function, we print \"Hello, Go World!\". \n", | ||
"\n", | ||
"Though you may not fully understand this code just yet, we will explore each part step-by-step in forthcoming lessons.\n", | ||
"\n", | ||
"---\n", | ||
"\n", | ||
"## Say Hello to Comments\n", | ||
"\n", | ||
"Similar to other programming languages, Go supports two kinds of comments: **single-line comments** and **multi-line comments**. \n", | ||
"- **Single-line comments** begin with `//`.\n", | ||
"- **Multi-line comments** are surrounded by `/* */`.\n", | ||
"\n", | ||
"Comments provide documentation and critical reference points within the code and don't affect the program execution. They are meant to make the codebase understandable and easy to work with.\n", | ||
"\n", | ||
"Here's an example of how you can use comments in your Go programs:\n", | ||
"\n", | ||
"```go\n", | ||
"package main // Single-line comment\n", | ||
"\n", | ||
"import \"fmt\"\n", | ||
"\n", | ||
"/* This is a multi-line comment in Go\n", | ||
" It spans multiple lines\n", | ||
" Useful for longer descriptions and notes */\n", | ||
"\n", | ||
"func main() { \n", | ||
" fmt.Println(\"Hello, Go World!\") // This line prints \"Hello, Go World!\"\n", | ||
"}\n", | ||
"```\n", | ||
"\n", | ||
"---\n", | ||
"\n", | ||
"## Build Your First Go Program\n", | ||
"\n", | ||
"Now that we've covered the basics, let's delve deeper into the first Go program you'll write! Here is a simple Go program we've already encountered:\n", | ||
"\n", | ||
"```go\n", | ||
"package main\n", | ||
"\n", | ||
"import \"fmt\"\n", | ||
"\n", | ||
"func main() {\n", | ||
" fmt.Println(\"Hello, Go World!\")\n", | ||
"}\n", | ||
"```\n", | ||
"\n", | ||
"Let's understand each part of the program:\n", | ||
"\n", | ||
"- **`package main`**: This line declares the name of the package that this file resides in, which in this case is `main`. The `main` package is special in Go. It defines an executable program rather than a library.\n", | ||
"- **`import \"fmt\"`**: This statement imports another package into the current package. The `fmt` package provides functionalities for formatted input/output.\n", | ||
"- **`func main() { }`**: This line defines the `main` function of the program, which is executed when we run our Go program. Similar to Java's `public static void main(String[] args)`, the `main` function in Go serves as the entry point for the program.\n", | ||
"- **`fmt.Println(\"Hello, Go World!\")`**: This is a function call to `fmt.Println()`, which prints out the passed string to the console.\n", | ||
"\n", | ||
"---\n", | ||
"\n", | ||
"## Lesson Summary and Practice\n", | ||
"\n", | ||
"Congratulations! You've embarked on your Go programming journey and have learned about its syntax and the importance of comments. Upcoming practice exercises will strengthen your understanding and provide hands-on experience in writing your first Go code. \n", | ||
"\n", | ||
"Remember, mistakes are stepping stones to success. Let's code away!\n", | ||
"\n" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"## Running Your First Go Program\n", | ||
"\n", | ||
"Let's run your very first Go program! Click Run to display a warm welcome from the world of Go programming on your screen!\n", | ||
"\n", | ||
"package main\n", | ||
"\n", | ||
"import \"fmt\"\n", | ||
"\n", | ||
"func main() {\n", | ||
" // This command prints a message to the console\n", | ||
" fmt.Println(\"Welcome to the world of Go, Programmer!\")\n", | ||
"}" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"## Embarking on Your Go Odyssey" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"## Debugging Go Syntax Errors" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"## Welcome Aboard: Your First Go Program" | ||
] | ||
} | ||
], | ||
"metadata": { | ||
"language_info": { | ||
"name": "python" | ||
} | ||
}, | ||
"nbformat": 4, | ||
"nbformat_minor": 5 | ||
} |
56 changes: 56 additions & 0 deletions
56
... with Go Programming Language/Lesson 2: Understanding Variables and Constants in Go.ipynb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
{ | ||
"cells": [ | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"# Lesson 2: Understanding Variables and Constants in Go" | ||
] | ||
} | ||
,{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"## Exploring Go: Variables and Constants of Our Planet" | ||
] | ||
} | ||
,{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"## Defining and Using Constants in Go" | ||
] | ||
} | ||
,{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"## Navigating Go Variables: Earth's Orbit and Solar System Count Debugging Challenge" | ||
] | ||
} | ||
,{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"## Defining Constants in Go: The Speed of a Cheetah" | ||
] | ||
} | ||
,{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"## Understanding Variables and Constants in Go" | ||
] | ||
} | ||
,{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"## Discovering a New Planet: Update the Variable" | ||
] | ||
} | ||
], | ||
"metadata": {}, | ||
"nbformat": 4, | ||
"nbformat_minor": 5 | ||
} |
42 changes: 42 additions & 0 deletions
42
...Started with Go Programming Language/Lesson 3: Understanding Basic Data Types in Go.ipynb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
{ | ||
"cells": [ | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"# Lesson 3: Understanding Basic Data Types in Go" | ||
] | ||
} | ||
,{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"## Go Data Types in Action: System Performance Evaluation" | ||
] | ||
} | ||
,{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"## Fuel Tank Precision Update" | ||
] | ||
} | ||
,{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"## System Report Generator Debugging" | ||
] | ||
} | ||
,{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"## Data Center Resource Calculation in Go" | ||
] | ||
} | ||
], | ||
"metadata": {}, | ||
"nbformat": 4, | ||
"nbformat_minor": 5 | ||
} |
49 changes: 49 additions & 0 deletions
49
...uage/Lesson 4: Understanding Go Comparison Operators: A Dive into Conditional Logic.ipynb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
{ | ||
"cells": [ | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"# Lesson 4: Understanding Go Comparison Operators: A Dive into Conditional Logic" | ||
] | ||
} | ||
,{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"## Determining the Need for Refueling on Our Space Journey" | ||
] | ||
} | ||
,{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"## Assessing Submarine Safety: Critical Depth Check" | ||
] | ||
} | ||
,{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"## Submarine Speed Comparison" | ||
] | ||
} | ||
,{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"## Add Comparison Operators to the Spaceship Program" | ||
] | ||
} | ||
,{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"## Voyage Calculations: Charting Distances to Venus and Neptune in Go" | ||
] | ||
} | ||
], | ||
"metadata": {}, | ||
"nbformat": 4, | ||
"nbformat_minor": 5 | ||
} |
Oops, something went wrong.