0% found this document useful (0 votes)
28 views

Assignment2 GroupD

This document provides information about an assignment for a group programming project in Go. It lists the names and student IDs of 9 group members and provides the URL for their GitHub repository containing the code. The assignment involves each group member contributing a function to a Go project demonstrating basic programming concepts. These functions include checking if a number is even/odd, converting temperatures, sorting arrays, reversing strings, finding the greatest of three numbers, calculating the cube of a number, quotients and remainders of numbers, checking if a number is prime, and checking if a year is a leap year. It provides brief descriptions of each member's contributed function and instructions for running the full program.

Uploaded by

engr.hammad.uet
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
28 views

Assignment2 GroupD

This document provides information about an assignment for a group programming project in Go. It lists the names and student IDs of 9 group members and provides the URL for their GitHub repository containing the code. The assignment involves each group member contributing a function to a Go project demonstrating basic programming concepts. These functions include checking if a number is even/odd, converting temperatures, sorting arrays, reversing strings, finding the greatest of three numbers, calculating the cube of a number, quotients and remainders of numbers, checking if a number is prime, and checking if a year is a leap year. It provides brief descriptions of each member's contributed function and instructions for running the full program.

Uploaded by

engr.hammad.uet
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Assignment – Week 4

Course Code: CSDD1008


Group: D

Instructor Name: Maziar Sojoudian

Group Information (Name-Student Id #)


1. Anas Baseer – 50022985
2. Hammad Ul Hassan – 500230292
3. Muhammad Ameen – 500225970
4. Prateek Nandiwada – 500220142
5. Ramanpreet kaur – 500218959
6. Sajjad Kazmi – 500217679
7. Sindhuja Peravali – 500228575
8. Kiranjeet kaur – 500219260
9. Rishav Salgotra – 500228178

URL of group's GitHub repository:


https://github.com/ameyster1999/groupD_assignment2.git
Assignment 2:

Overview
This assignment is a collection of Go functions, each demonstrating different basic functionalities in Go
programming by group members of Group D. The project includes functions for checking if a number is
even or odd, converting Celsius to Fahrenheit, sorting an array, reversing a string, finding the greatest of
three numbers, calculating the cube of a number, calculating the quotient and remainder of two numbers,
checking if a number is prime and checking if a given year is a leap year. Each function has been
contributed by each member of the group.

How to Run
To run this project, you must have Go installed on your system. Follow these steps:
1. Clone or download the project to your local machine.
2. Open a terminal and navigate to the project directory.
3. Run the command `go run main.go`
4. Follow the on-screen prompts to interact with the different functionalities.

Functions:

isEven` by Hammad Ul Hassan - 500230292


Description: Checks if a given number is even or odd. This function takes an integer as input and returns
"Even" if the number is divisible by 2, otherwise "Odd".

celsiusToFahrenheit` by Sajjad Kazmi - 500217679


Description: Converts temperature from Celsius to Fahrenheit. Accepts a float64 representing Celsius
temperature, converts it to Fahrenheit, and prints the result.

sortArray` by Ramanpreet Kaur - 500218959


Description: Sorts an array of integers in ascending order. Uses the `sort.Ints` method from the
`sort` package to sort a slice of integers.

revString` by Kiranjeet kaur - 500219260


Description: Reverses a given string. Takes a string, splits it into characters, reverses the order, and then
concatenates them back to a string.

greatestOfThree` by Rishav Salgotra - 500228178


Description: Find the greatest among the three entered numbers. Prompts the user to enter three numbers
and then determines the greatest among them using the `greatest` helper function.

cube` by Muhammad Ameen - 500225970


Description: Calculates the sum of two numbers. It takes two input numbers and provides the addition of
those two numbers.

Quotient & Remainder` by Sindhuja Peravali - 500228575


Description: Calculates the quotient and the remainder of two numbers. Prompts the user to enter two
numbers for dividend and divisor and displays the quotient and remainder using ‘divide’ function.

IsPrime` by Prateek Nandiwada - 500220142


Description: Checks if a number is a prime number. Prompts the user to enter a number and determines if
the entered number is prime or not using the ‘isPrime’ function.

isLeapYear` by Anas Baseer - 500229851


Description: Checks if a year is a leap year. Prompts the user to enter a year and determines if the entered
year is leap year or not using the ‘isLeapYear’ function.

You might also like