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

Go Mini Project Activity

Uploaded by

chetanmorankar6
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
26 views

Go Mini Project Activity

Uploaded by

chetanmorankar6
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

Kamala Education Society’s

Pratibha College of Commerce & Computer Studies, Chinchwad, Pune-19

A
Project Report
On
“Project Title”
Temperature Converter Program in Go language

Developed by,
Roll/ Seat No:9645
Student Name:Chetan Vinayak Morankar
Roll/ Seat No:9681
Student Name:Pravin Dattatray Shinde
TYBCA(SCIENCE)
Under
Savitribai Phule Pune University
(2023-2024)
Index

Sr. No. Content Page No.

1 Introduction

2 Program to convert the temperature in other


units

3 Formulas for conversion

4 Program source code

5 Output Screen
IntroductIon
A temperature converter helps in the conversion of
the measurement units of the temperature recorded
in a particular unit. Temperature expresses the
degree of heat or cold of a solid, liquid, or gas.
Temperature is measured using a thermometer.
Temperature conversions are crucial in many
scientific expeditions, Fahrenheit is a scale of
temperature and celsius is also a temperature scale,
but sometimes we need to convert fahrenheit to
celsius for medical settings, travels, and more. In this
article, we are going to explore conversion of
Fahrenheit temperature to corresponding Celsius in
Go programming language.
temperature
converter
Temperature Converter tool enables swift conversion

between Celsius, Fahrenheit, and Kelvin scales, facilitating

easy transitions between different temperature

measurement systems with accuracy and efficiency.

About Temperature Converter

The Temperature Converter facilitates swift conversion

between Celsius, Fahrenheit, and Kelvin. It simplifies

temperature comparisons and calculations, allowing users

to seamlessly switch between these units, aiding in diverse

fields such as science, weather analysis, cooking, and daily

temperature measurements, enhancing understanding and

convenience in temperature interpretation.

What is Celsius?

The Celsius scale, or centigrade scale, uses 0°C for water’s


freezing point and 100°C for its boiling point, serving as a

standard temperature measurement system.

What is Fahrenheit?

Fahrenheit is a temperature scale where water freezes at

32°F and boils at 212°F, commonly used in the United States.

What is Kelvin ?

Kelvin is an absolute temperature scale where zero

represents absolute zero, the point where molecular

motion ceases, often used in scientific contexts.

Used Formula

The Temperature Converter utilizes distinct formulas for

temperature unit conversions. It employs:

Features of Temperature Converter

Multiple Scale Conversion: Converts between Celsius,

Fahrenheit, and Kelvin, facilitating easy temperature

measurement comparisons.

User-Friendly Interface: Intuitive design for effortless entry

and swift conversion.

Accuracy and Precision: Ensures accurate temperature


conversions for diverse needs.

Real-time Results: Provides instant temperature conversion

outputs for quick reference and use.

How Does Temperature Converter Work ?

A Temperature Converter functions by applying specific

mathematical formulas to convert temperatures between

Celsius, Fahrenheit, and Kelvin scales. It utilizes algorithms

that accurately translate user-input temperatures to their

equivalents in other scales, delivering immediate and

precise results based on the chosen conversion formula for

each scale.

Formulas For temperature conversIon


program source code
package main

import (

"fmt"

"math"

func main() {

// Create a menu

fmt.Println("Temperature Conversion Program")

fmt.Println("1. Celsius to Fahrenheit")

fmt.Println("2. Fahrenheit to Celsius")

fmt.Println("3. Exit")

// Get the user's choice

var choice int

fmt.Scanln(&choice)

// Convert the temperature

switch choice {

case 1:

// Celsius to Fahrenheit

var celsius float64

fmt.Println("Enter the temperature in Celsius: ")


fmt.Scanln(&celsius)

fahrenheit := (celsius * 9 / 5) + 32

fmt.Println("The temperature in Fahrenheit is:", fahrenheit)

case 2:

// Fahrenheit to Celsius

var fahrenheit float64

fmt.Println("Enter the temperature in Fahrenheit: ")

fmt.Scanln(&fahrenheit)

celsius := (fahrenheit - 32) * 5 / 9

fmt.Println("The temperature in Celsius is:", celsius)

case 3:

// Exit

fmt.Println("Goodbye!")

return

default:

// Invalid choice

fmt.Println("Invalid choice. Please enter a number between 1 and 3.")

output screen

You might also like