0% found this document useful (0 votes)
18 views19 pages

A Micro Project Report On "Weight Converter": Submitted For: Diploma in Computer Engineering Msbte, Mumbai

python

Uploaded by

Devdas Jadhav
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views19 pages

A Micro Project Report On "Weight Converter": Submitted For: Diploma in Computer Engineering Msbte, Mumbai

python

Uploaded by

Devdas Jadhav
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 19

Department of Computer Engineering

A MICRO PROJECT REPORT ON


“Weight Converter”

Submitted For:
DIPLOMA IN COMPUTER ENGINEERING
MSBTE,MUMBAI

Vidyavardhini Charitable Trust’s


Abhaysinharaje Bhonsle Institute of Technology (Polytechnic)
Shahunagar, Shendre, Satara.
Institute Code : 0983
2024-2025

Academic Year

(2024-25)

Page | 1
Department of Computer Engineering

Vidyavardhini Charitable Trust’s


Abhaysinharaje Bhonsle Institute of Technology (Polytechnic)
Shahunagar, Shendre, Satara.

CERTIFICATE
Submitted By

Roll No. Name Enrollment No

55 Nalawade Trupti Sudhakar 23212230068`

56 Jagtap Vaishnav Dadasaheb 23212230064


57 Jadhav Devdas Avinash 2209830013

Diploma in Computer Engineering(CO5I) has satisfactorily completed the project work


under micro project report on, “Weight Converter“ under my guidance and
supervision, this is part of partial fulfillment of the requirement for submission of
Maharashtra State Board of Technical Education, Mumbai during semester third
of Academic year 2024-25

PROJECT GUIDE HOD PRINCIPAL

Ms. Mohite J.S Mrs.Nikam R.A Mr.Dhumal S.U.

Page | 2
Action Plan:

Sr.No. Detailsof activity Start Finish Responsible


Date Date Team
Member
1 Selected the topic for micro- 23/02/2025 26/02/2025 Devdas
project
2 We organised things required 28/2/2025 30/02/2025 Vaishnav
for our project
3 We browsed the internet for 3/03/2025 5/03/2025 Trupti
information and raw data
4 We attended extra lectures 16/03/2025 20/03/2025 Devdas
for our project topic
5 We made points/notes on the 21/03/2025 21/03/2025 Vaishnav
information we collected
6 We created a word document 1/04/2025 2/04/2025 Trupti
with help of our teacher
7 We made correctionsby 5/04/2025 6/04//2025 Devdas
discussing with our teacher
8 We also created a PDF 6/04/2025 7/04/2025 Vaishnav
document to make a hard
copy of the report

3
ACKNOWLEDGEMENT
This Micro project would not have been possible without
considerable guidance and support. So, we would like to acknowledge those
who have enable us to complete this project.Firstly, we would like to thank our
project guide M.S Mohite J S (ABIT College, Shendre ) and HOD Mrs
Nikam R.A for providing the guideline with continuous advice and feedback
Secondly, we would also like to thank all other staff members of
Computer department that we may called upon for assistance since the genesis
of this project their opinion and suggestion have helped us in a realizing this
project.
Also, not to be forgotten, we would like to thank all our friends with the
report valuable opinion and sharing ideas during the process of this project
Finally, we would like to thank our families for their understanding,
encouragement and support towards the completion of project.

Thank so much.

4
Index
Sr No Title Page No
1 Introduction 6

2 Project and Objective 7

3 Methodology 8

4 How to Project Work 9

5 Flowchart 10
6 Requirement 11

7 Code 12

8 Output 13

9 Advantages and Disadvantages 14

10 Limitations 15

11 Features 16

12 Application 17

13 Conclusion 18

14 References 19

5
Introduction

The Python Weight Converter is a simple yet practical microproject


aimed at converting weights between different units such as kilograms
(kg), grams (g), pounds (lb), and ounces (oz). This type of application is
commonly used in day-to-day scenarios, such as grocery shopping,
fitness tracking, or academic projects.
Python, being a beginner-friendly and versatile programming language,
is well-suited for building such utility-based tools. The converter accepts
user input for a weight value and its unit, and then calculates the
equivalent values in the other units using predefined conversion
formulas. This project helps improve understanding of Python basics like
input/output, conditional statements, and arithmetic operations.
Whether implemented as a Command Line Interface (CLI) or using a
graphical interface with Tkinter, this microproject demonstrates how
Python can be used to create functional and user-friendly tools.

today’s fast-paced and globalized world, accurate unit conversion


tools have become essential for professionals and everyday users alike.
Whether it’s converting grocery weights, fitness tracking metrics,
packaging details, or academic data, a reliable and easy-to-use weight
converter can save time and reduce manual errors.
This microproject focuses on creating a Weight Converter using
Python, a high-level, versatile programming language known for its
simplicity and readability. The project demonstrates how Python can be
used to solve real-world problems using fundamental programming
concepts such as variables, user input, conditional logic, functions, and
formatted output.
The program allows the user to input a weight in a specific unit — such
as kilograms (kg), grams (g), pounds (lb), or ounces (oz) — and
instantly converts the entered value to all other related units. The
conversion is based on standard, predefined mathematical formulas,
ensuring accuracy and consistency.

6
Project and Objective

•To develop a simple and efficient Python program that converts weight
between various units such as kilograms, grams, pounds, and ounces.
•To practice and apply core Python concepts including user input,
conditionals, mathematical operations, and formatted output.
•To provide users with a quick and accurate tool for performing weight
conversions for daily, academic, or professional use.
•To improve programming logic and problem-solving skills through
real-world application development.
•To design a user-friendly interface, either CLI or GUI (using Tkinter),
to enhance usability and accessibility.
•To demonstrate how Python can be used for building practical utility
applications and lay the foundation for more advanced projects.

7
Methodology

The Python Weight Converter works by accepting a user-inputted


weight value and a selected unit of measurement. It then uses
standard conversion formulas to calculate and display equivalent
weights in other units. Here's how the process works step-by-step:

1.User Input:
•The user is prompted to enter the numerical weight value.
•The user selects or types the original unit (e.g., kg, g, lb, oz).
2.Conversion Logic:
•The program contains pre-defined formulas for converting
between different units.
•Based on the user’s input, the corresponding conversion
operations are applied.
3.Calculation:
•The program calculates equivalent values in the remaining
units.
4.Output Display:
•The results are neatly displayed to the user in the terminal (or
GUI if implemented).
•Example:
5.Optional GUI (if used):
•Tkinter widgets (Entry, Dropdown, Button, Label) allow users
to interact via a graphical interface.
•Results are shown dynamically on the window.

8
How to Project Work

The Python Weight Converter project works by taking a numerical


weight input from the user along with the original unit of
measurement (such as kilograms, grams, pounds, or ounces). Once
the user provides this information, the program validates the input
and applies standard mathematical formulas to convert the weight
into all other supported units. For example, if the user enters 1
kilogram, the program will automatically calculate its equivalent in
grams, pounds, and ounces. These values are then displayed clearly
in the terminal or GUI, depending on the version of the program
used. The logic behind the conversions is implemented using simple
conditional statements and arithmetic operations in Python. This
makes the tool highly practical, especially for students, fitness
enthusiasts, chefs, and anyone needing quick and accurate weight
conversions.

9
Flowchart

10
Requirements

🧰 Software Requirements

1.Python 3.x – The main programming language used for


development.

2.Code Editor/IDE – Any one of the following:


1. IDLE (comes with Python)
2. VS Code
3. PyCharm

3.(Optional) Tkinter Library – For GUI version (comes pre-


installed with Python).

Hardware Requirements

1.A basic computer or laptop with:


1. Minimum 2 GB RAM
2. At least 100 MB of free disk space

2.Keyboard and display (for input/output interaction)

11
Code :
def convert_weight(weight, unit):
if unit == "kg":
grams = weight * 1000
pounds = weight * 2.20462
ounces = weight * 35.274
elif unit == "g":
grams = weight
weight = weight / 1000
pounds = weight * 2.20462
ounces = weight * 35.274
elif unit == "lb":
weight = weight / 2.20462
grams = weight * 1000
pounds = weight * 2.20462
ounces = weight * 35.274
elif unit == "oz":
weight = weight / 35.274
grams = weight * 1000
pounds = weight * 2.20462
ounces = weight * 35.274
else:
return "Invalid unit!"

return f"""
Converted Weights:
Kilograms: {round(weight, 4)} kg
Grams: {round(grams, 2)} g
Pounds: {round(pounds, 2)} lb
Ounces: {round(ounces, 2)} oz
"""

# --- Main Program ---


print("Welcome to the Weight Converter")
weight = float(input("Enter the weight: "))
unit = input("Enter the unit (kg/g/lb/oz): ").lower()

result = convert_weight(weight, unit)


print(result) 12
Output

Welcome to the Weight Converter


Enter the weight: 1
Enter the unit (kg/g/lb/oz): lb

Converted Weights:
Kilograms: 0.4536 kg
Grams: 453.6 g
Pounds: 1.0 lb
Ounces: 16.0 oz

13
Advantages

1.Easy to Use – The program has a simple structure, making it


beginner-friendly and quick to use.
2.Accurate Conversions – Uses reliable and standard formulas to
ensure precise results.
3.Cross-Platform Support – Works on Windows, macOS, and Linux
with Python installed.
4.Expandable Design – Easy to upgrade with more units or a GUI
interface using Tkinter.

Disadvantages
1.Limited Unit Support – Only supports four weight units (kg, g, lb,
oz).
2.No Input Validation – Invalid inputs may cause the program to crash
or behave unexpectedly.
3.No History Feature – Does not store or log past conversions for
future use.
4.Basic CLI Interface – Not ideal for non-technical users; lacks
graphical interface in CLI version

14
Limitations

1.Limited to Weight Units Only


The current version supports only four weight units (kg, g, lb, oz). It
does not handle other unit types like temperature, length, or volume.

2.No Input Validation in CLI Version


If the user enters invalid input (e.g., text instead of numbers or an
unknown unit), the program may crash or show incorrect output.

3.No Persistent Storage


The program does not save conversion history or results — once
closed, all data is lost.

4.Basic User Interface


The CLI version is functional but not visually appealing. Users
unfamiliar with terminals may prefer a GUI version.

5.Single Conversion Session


The program currently runs once per execution. For multiple
conversions, the user must re-run the program unless loop logic is
added.

15
Features

1.Multi-Unit Conversion
Converts weight between commonly used units: Kilograms (kg),
Grams (g), Pounds (lb), and Ounces (oz).
2.Instant Results
Performs conversions and displays all equivalent weights
immediately after input.
3.Simple Interface (CLI)
Easy-to-use Command Line Interface that prompts users step-by-step
for input.
4.Accurate Calculations
Uses standard and precise conversion formulas to ensure accurate
results.
5.Lightweight Program
Requires minimal system resources and runs on any machine with
Python installed.
6.Cross-Platform Compatibility
Can be executed on Windows, macOS, and Linux without any
changes.
7.Expandable Design
Easily extendable to include other units (e.g., milligrams, tons) or
even other measurement types (like length or temperature).
8.Optional GUI Support
Can be upgraded with a Tkinter GUI interface for a more interactive
user experience.

16
Application

Educational Tool
Useful for students learning about Python, unit conversions, or real-world
application development
.
Retail & Grocery
Helps shopkeepers or buyers convert weight units quickly (e.g., from kg to lb for
international packaging)
.
Health & Fitness
Can be used to convert weights for diet plans or workout tracking in preferred units
.
Cooking & Recipes
Converts ingredient weights from grams to ounces or pounds for international
recipes
.
Logistics & Shipping
Assists in converting item weights for freight calculations or labeling
.
Software Foundation
Serves as a base for building more advanced unit converters (including length,
temperature, etc.).

17
Conclusion

The Python Weight Converter microproject successfully demonstrates how


programming can solve everyday problems in a simple and efficient manner. Using
basic Python concepts such as input handling, conditional logic, arithmetic
operations, and functions, the application accurately converts weights between
commonly used units like kilograms, grams, pounds, and ounces.

The project is lightweight, cross-platform, and user-friendly, making it accessible to


beginners and useful in various real-life situations such as shopping, cooking, and
fitness tracking. It also serves as a strong foundation for expanding into more
complex conversion tools involving other units or a graphical interface.
Overall, this project enhances both programming skills and practical problem-
solving abilities, aligning well with educational and real-world objectives.
.

18
References

Python Official Documentation


https://docs.python.org/3/
(For Python syntax, functions, and standard library usage)

W3Schools Python Tutorial


https://www.w3schools.com/python/
(Helpful for understanding basic Python concepts and examples)

GeeksforGeeks Python Programming


https://www.geeksforgeeks.org/python-programming-language/
(Reference for Python code examples, conversion logic, and tutorials)

Unit Conversion Data Sources


1 kg = 2.20462 pounds
1 kg = 35.274 ounces
1 pound = 16 ounces
(Sourced from standard metric-imperial conversion tables)

Book:
“Automate the Boring Stuff with Python” by Al Sweigart
(Good beginner-friendly book to learn practical Python applications)

19

You might also like