0% found this document useful (0 votes)
8 views14 pages

Python Microproject

Uploaded by

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

Python Microproject

Uploaded by

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

DEVELOP A WEATHER APP

Under Course: PYTHON PROGRAMMING (314015)

SEMESTER: IV

Matoshri Aasarabai Polytechnic, Eklahare, Nashik

Academic Year: 2024-25


CERTIFICATE
This is to certify that following students of FOURTH SEMESTER Diploma
Engineering Program in Computer Department have successfully
completed the Micro-Project “DEVELOP A WEATHER APP.” Under My
Supervision, in the partial fulfillment of Course PYTHON PROGRAMMING
(314015) for Academic Year 2024-2025 as
per prescribed in the MSBTE “K-Scheme” curriculum.

Sr. Roll Enrollment No. Name of Candidates


No. No.
1. 22 23611810223 PRIYANKA DHUMSE
2. 28 23611810232 CHANCHAL LOHAR

Date: Place: Nashik

Subject Teacher Head of Department Principal

(Ms.P.V.JADHAV) (Mr.V. A. SONAWANE) (Dr.A.S.RELKAR)


Programme: Computer Engineering Semester:-Fourth

Course:- Python Programming Course Code :314015

Tittle of Micro Project: DEVELOP A WEATHER APP

SR_NO. CONTENT PAGE NO.


Part A

1.0 Brief Introduction

2.0 Aim of Micro Project

3.0 Action Plan

4.0 Resources Required


ACKNOWLEDGEMENT

With deep sense of gratitude we would like to thanks all


the people who have lit our path with their kind guidance.
We are very grateful to these intellectuals who did their
best to help during our project work. It is our proud
privilege to express deep sense of gratitude to,
Dr.A.S.RELKAR Principal of Matoshri Aasarabai
Polytechnic, Eklahare, Nashik, for his comments and kind
permission to complete this Micro Project. We remain
indebted to Prof. Mr.V.A.SONAWANE, Head of Computer
engineering department for his suggestion and valuable
guidance. The special gratitude goes to our internal guide
Ms.P.V.JADHAV, technical staff members, and non-
technical staff members, of Computer Tech. Department
for their expensive, excellent and precious guidance in
completion of this work.
Programme: Computer Engineering Semester:-Fourth

Name of faculty: Ms.P.V.JADHAV Course Code : 314015

Tittle of Micro Project: DEVELOP A WEATHER APP

Sr. Roll Enrollment No. Name of Candidates Sign


No. No.
1. 22 23611810223 PRIYANKA DHUMSE

2. 28 23611810232 CHANCHAL LOHAR


Title of Micro-Project

DEVELOP A WEATHER APP

Description :

This microproject is a simple Weather App built using Python that


allows users to check real-time weather information for any city using
an API. It fetches data such as temperature, weather condition,
humidity, wind speed, and displays it in a user-friendly format through
a command-line interface or a graphical user interface (GUI) using
libraries like Tkinter.

Aim of Micro Project :

To develop a Python-based Weather App that retrieves and displays


real-time weather information for any city using a public API, helping
users stay informed about current weather conditions through a simple
interface.

Key Features :

 User inputs the city name

 Real-time weather data is fetched using OpenWeatherMap API (or similar)

 Displays:

 Current Temperature (in Celsius or Fahrenheit)


 Weather Description (e.g., Clear, Rain, Clouds)
 Humidity
 Wind Speed

 GUI version includes a search box and results panel


CODE :

import requests
import matplotlib.pyplot as plt

def get_weather(city_name, api_key):


base_url =
"http://api.openweathermap.org/data/2.5/weather?"
complete_url =
f"{base_url}q={city_name.strip()}&appid={api_key}&units=metri
c"

try:
response = requests.get(complete_url)
data = response.json()

if data["cod"] == 200:
main = data["main"]
weather = data["weather"][0]

temp = main['temp']
feels_like = main['feels_like']
humidity = main['humidity']
print(f"\nWeather in {city_name.title()}:")
print(f"Temperature: {temp}°C")
print(f"Feels Like: {feels_like}°C")
print(f"Humidity: {humidity}%")
print(f"Condition: {weather['description'].title()}")

# Pie chart data


labels = ['Temperature', 'Feels Like', 'Humidity']
values = [temp, feels_like, humidity]
colors = ['#FF9999', '#66B3FF', '#99FF99']

plt.figure(figsize=(6, 6))
plt.pie(values, labels=labels, autopct='%1.1f%%',
colors=colors, startangle=140)
plt.title(f"Weather Info for {city_name.title()}")
plt.axis('equal') # Equal aspect ratio ensures that pie is
drawn as a circle.
plt.show()

else:
print("Error from API:", data)
except Exception as e:
print("Error:", e)

api_key = "1705e48ef3f9798fb39b394e71a0a09f"

while True:
city = input("\nEnter city name (or type 'exit' to quit): ")
if city.lower() == 'exit':
print("Thanks for using the Weather App!")
break
get_weather(city, api_key)
OUTPUT :
Output-1
Output-2
CONCLUSION:

In conclusion, the Weather App microproject successfully demonstrates


how Python can be used to build real-time, data-driven applications by
integrating external APIs. Through this project, we were able to retrieve
and display current weather information such as temperature, humidity,
wind speed, and weather conditions for any user-specified city.

The project not only helped in understanding the basics of API


interaction and JSON data parsing, but also provided hands-on
experience in using Python libraries like requests and Tkinter. It served
as a practical implementation of key programming concepts and
improved skills in handling real-world data, error management, and user
interface design.

Overall, this microproject laid a strong foundation for building more


complex and interactive Python applications in the future, and
highlighted the importance of integrating third-party services to enrich
user experience.
ANNEXURE – II

Programme: Computer Engineering Semester:-Fourth

Name of faculty: Ms.P.V.JADHAV Course Code : 314015

Outcomes of the Weather App:


1. Understanding of API Integration
2. Improved Python Programming Skills
3. Project Documentation & Presentation
4. Practical Use of JSON Handling
5. Increased Problem-Solving and Debugging Skills

Sr. Roll Enrollment No. Name of Candidates Sign


No. No.
1. 22 23611810223 PRIYANKA DHUMSE

2. 28 23611810232 CHANCHAL LOHAR


THANK YOU!

You might also like