Skip to content

qericdev/golang-basic-projects

Repository files navigation

Golang Basic Projects

This repository, golang-basic-projects, is a collection of mini-projects developed in Go language. These projects are specifically designed for beginners to help them learn the basics of Go programming. Each project in this repository focuses on a different fundamental concept in programming.

Projects

1. Hello World

Request: Write a program that prints "Hello, World!" to the console.

The helloworld project is the most basic program possible in Go. It's used as a starting point for any new Go programmer and simply prints out the message "Hello, World!".

2. Sum and Average

Request: Write a program that takes an array of integers as input and calculates their sum and average.

The sumandaverage project takes multiple numbers as input and calculates their sum and average.

3. Factorial Function

Request: Write a function that calculates the factorial of a number. A factorial of a number n is the product of all positive integers less than or equal to n.

The factorialfunction project calculates the factorial of a given number. The factorial of a number is the product of all positive integers up to that number.

4. Fibonacci Sequence

Request: Write a program that generates the first n numbers in the Fibonacci sequence. The Fibonacci sequence is a series of numbers in which each number is the sum of the two preceding ones, usually starting with 0 and 1.

The fibonaccisequence project generates the Fibonacci series up to a specified term. The Fibonacci series is a sequence of numbers where the next number is found by adding up the two numbers before it.

5. String Reversal

Request: Write a function that takes a string as input and returns the string reversed.

The stringreversal project is used to reverse the input string. It's a common exercise to understand string manipulation in any language.

Please note that these projects are meant for educational purposes and to help beginners learn the basics of Go. More projects will be added to this repository in the future.

6. Palindrome Check

Request: Write a function that checks if a given word or phrase is a palindrome (reads the same backwards as forwards, ignoring spaces, punctuation, and capitalization).

The palindromecheck project is used to verify if the input string is a palindrome. A palindrome is a word, phrase, number, or other sequences of characters that reads the same forward and backward, ignoring spaces, punctuation, and capitalization. It's a common exercise to understand string manipulation and condition checking in any language.

7. Structs and Methods

Request: Define a struct for a Rectangle with two fields, length and width. Write methods to calculate the area and perimeter of the Rectangle.

The rectangle project focuses on the use of structs and methods in Go. Structs are used to group together variables of different types, forming the basis for object-oriented programming in Go. In this project, you will create a rectangle struct with two fields, length and width, and write methods to calculate the area and perimeter of a rectangle.

8. Sorting Slice

Request: Write a program that sorts a slice of integers in ascending order. Try implementing a simple sorting algorithm, like bubble sort or selection sort, yourself.

The sortingslice project focuses on implementing sorting algorithms in Go. In computer science, sorting is a fundamental concept, and different sorting algorithms have different efficiencies, which makes them an interesting topic to explore and understand.

In this project, you will write a program that sorts a slice of integers in ascending order. You will implement simple sorting algorithms, like bubble sort and selection sort. This is a common exercise for understanding arrays or slices, loops, conditionals, and basic algorithms in Go.

The user should be able to enter a list of integers to be sorted. They should also have the option to choose the sorting algorithm to use, and the program should output the sorted list.

This project is an excellent opportunity for beginners to practice array/slice manipulation and algorithm implementation in Go. More complex projects involving data structures and algorithms will be added to this repository in the future.

Support

If you have any questions or need further assistance, please open an issue on this repository.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages