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

python project

The document outlines a micro-project titled 'Developing Application for World Clock with Python' undertaken by a group of students in the Computer Engineering program at Pimpri Chinchwad Polytechnic. The project aims to create a user-friendly application that displays current times across different time zones, utilizing Python libraries such as Tkinter and pytz for GUI and time management. It includes a detailed methodology, action plan, and intended course outcomes related to programming and GUI development.

Uploaded by

korulkarganesh
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)
6 views

python project

The document outlines a micro-project titled 'Developing Application for World Clock with Python' undertaken by a group of students in the Computer Engineering program at Pimpri Chinchwad Polytechnic. The project aims to create a user-friendly application that displays current times across different time zones, utilizing Python libraries such as Tkinter and pytz for GUI and time management. It includes a detailed methodology, action plan, and intended course outcomes related to programming and GUI development.

Uploaded by

korulkarganesh
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/ 20

Group 50

Micro-Project
Academic Year 2024-25

 Course name: Computer Engineering


 Title of Microproject: Developing application for
World clock with Python
 Course Code: 22616
 Course Co-ordinator:

Department of Computer Engineering, Pc Polytechnic


Group 50

Pimpri Chinchwad Education Trust’s CO-R-46


Pimpri Chinchwad Polytechnic
Computer Department Revision Date:
(NBA Accredited and ISO 9001:2015Certified Department) / /2023
Page:02/11
Academic Year: 2022-23

Microproject Report
Part A Part B
Name of Program: Diploma in Computer Engineering

Semester: 6th (Sixth)

Name of Subject and Code: Programming With Python(PWP)

Name of the topic: Developing application for World


clock with Python

Name of Team Members: Sarthak Shivdas Bhor


Ritesh Parag Bharambe
Vaishnvi Ramkrishna Korde
Ganesh Dattatray Korulkar
Name and Sign of Project guide:

Sign:

Department of Computer Engineering, Pc Polytechnic


Group 50

Maharashtra State
Board of Technical Education, Mumbai
(Autonomous) (ISO-9001-2008) (ISO/IEC 27001:2013)

CERTIFICATE
This is to certify that Mr/Mrs. 147-Ritesh Parag Bharambe, 153-Sarthak Shivdas Bhor ,
175-Ganesh Dattatray Korulkar, 197-Vaishnavi Ramkrishna Korde of Diploma in
Computer Engineering of Pimpri-Chinchwad Polytechnic has completed Micro projects of
the course ……………………………………………. as prescribed in the curriculum for the
academic year 2024-25.

Place: Akurdi
Date:

Course In charge
Head of Department
……………… Prof. M.S. Malkar

Seal of institute

Department of Computer Engineering, Pc Polytechnic


Group 50

PART-A
Micro Project Proposal

 Title: Developing Application for world clock with Python

 Aims/benefits of the micro-project:


The aim is to create a user-friendly application that allows users to view
and track time across different time zones around the world. The
application should provide accurate and up-to-date information,
displaying the current time in multiple locations simultaneously.

 Design and Develop User Interface: Create an intuitive graphical


user interface (GUI) that allows users to interact with the application
easily. The interface should provide options to add, remove, and
manage different time zones, as well as display the current time in
each selected location.
 Retrieve and Display Time Information: Implement the
functionality to fetch the current time from reliable sources or APIs
for various time zones. This may involve using Python libraries or
APIs that provide accurate time zone data.
 Time Zone Management: Enable users to add and remove time
zones of their choice, allowing them to customize the clock display
according to their preferences. Provide options to search and select
time zones from a list or map, ensuring flexibility and convenience.
 Time Conversion: Implement the logic to convert the current time
from one time zone to another based on user selections. This will
enable users to compare and track time across different locations
effortlessly

 Description:

The World Clock Application is a Python-based desktop utility that allows


users to track the current time in different cities across the world. With the
increasing globalization of businesses and communication, keeping track of
time in various countries has become essential. This application aims to offer
a simple, efficient, and interactive way to view real-time time zones for
multiple locations around the globe.

Department of Computer Engineering, Pc Polytechnic


Group 50

Developed using Python, this application leverages Tkinter for creating a


user-friendly graphical interface and pytz for accurate time zone
conversions. Users can select their desired city or country from a dropdown
menu, and the application will instantly display the current local time of that
region. Additionally, the application updates the time dynamically every
second, providing a live clock experience.

 Course Outcomes Addressed:


The micro project of developing an application for a world clock with
Python can address several course outcomes depending on the specific
context and curriculum. Here are some possible course outcomes that can
be addressed:
 Programming Fundamentals: The project involves implementing
programming concepts such as user interface design, data retrieval
and manipulation, error handling, and time zone conversions. It helps
students reinforce their understanding of fundamental programming
principles and techniques.
 Graphical User Interface (GUI) Development: Designing and
developing a user-friendly GUI for the world clock application helps
students learn about GUI frameworks, event handling, layout
management, and user interaction. It provides hands-on experience
in creating visually appealing and interactive interfaces.
 Time and Date Manipulation: The project requires students to
manipulate time and date data, perform time zone conversions, and
handle time-related calculations. This reinforces their understanding
of time-related concepts and exposes them to various date/time
manipulation libraries or functions in Python.
 Documentation and Communication Skills: Creating clear and
comprehensive documentation for the world clock application allows
students to practice their technical writing and communication skills.
It helps them effectively communicate the purpose, functionality,
installation instructions, and usage guidelines of their project.

Department of Computer Engineering, Pc Polytechnic


Group 50

 Proposed methodology:
 The group members discussed the topic of project.
 Collecting the information according to the requirements.
 Working of each student was given by leaders.
 We collected information related to project.
 After gathering information, we studied about the topic.
 Changes were made according to the requirements of projects
 Report was submitted along with presentation.

 Action Plan:
SR. DETAILS OF PLANNED PLANNED NAME OF
NO ACTIVITY START FINISHED RESPONSIBLE
DATE DATE TEAM MEMBER
1. Topic given by subject
teacher and discussed Ganesh Korulkar
with given members.
2. Design of project
3. Planning of project
4. Distribution of task and Ritesh Bharambe
discussion of role and
responsibilities of each
other
5. Collection of information
related to the topic
6. Analysed the collected Sarthak Bhor
data and finalise structure
of the project
7. Report preparation
8. Implementation
Vaishnvi Korde

 Actual resources required:


Sr.n Name of the Specification Remarks
o resources
1. textbook Python Programming Used
2. Internet Wikipedia/Google Used
3. MS Word Windows 11 Used

Department of Computer Engineering, Pc Polytechnic


Group 50

 List of team members:


Roll No. Enrollment no. Name
147 2200560243 Ritesh Parag Bharambe
153 2200560244 Sarthak Shivdas Bhor
175 2200560246 Ganesh Dattatray Korulkar
197 23211000322 Vaishnavi Ramkrishna Korde

Department of Computer Engineering, Pc Polytechnic


Group 50

PART-B
Micro Project Proposal
 Brief Description:
Development Process The development process for the World Clock
application involves the following steps:

Step 1: Setting up the Development Environment Ensure that Python is


installed on your system. You may also choose to use a Python virtual
environment for better dependency management.

Step 2: Choosing the User Interface (UI) Framework Select a suitable UI


framework for creating the graphical interface of the application. Options
include Tkinter, PyQt, or PySide.

Step 3: Retrieving Timezone Information Utilize Python libraries like pytz


or dateutil to fetch the required timezone information. These libraries
provide comprehensive support for time zone conversions and handling
daylight saving time.

Step 4: Designing the User Interface Create a visually appealing user


interface using the chosen UI framework. Design the application’s layout,
including elements like city labels, time displays, and buttons for adding or
removing cities.

Step 5: Implementing the Functionality Write Python code to implement


the functionality of the World Clock application. This involves retrieving the
current time for each city, updating the time display, handling user
interactions, and managing the city list.

Step 6: Testing and Debugging Thoroughly test the application to ensure its
functionality is working as expected. Handle potential issues or bugs that
arise during the testing phase.

a) Choosing the User Interface (UI) Framework:

● Tkinter: Tkinter is a built-in Python library for creating graphical


user interfaces. It provides a simple and easy-to-use interface for
developing basic applications.

Department of Computer Engineering, Pc Polytechnic


Group 50

● PyQt: PyQt is a Python binding for the popular Qt framework. It offers


a wide range of
features and allows for creating professional-looking interfaces with
rich functionality.

● PySide: PySide is another Python binding for Qt, similar to PyQt. It


provides an alternative option for developing cross-platform
applications with a graphical interface.

b) Retrieving Timezone Information:

● pytz: pytz is a Python library that provides access to the Olson time
zone database. It allows for accurate time zone conversions and
handling daylight saving time.

● dateutil: dateutil is another Python library that offers extensive


support for working with dates and time zones. It simplifies the
process of dealing with time zone-related operations.

c) Implementing the Functionality:

● Use the datetime module in Python to retrieve the current time and
date.

● Utilize the chosen timezone library (pytz or dateutil) to convert the


time to the desired time zone.

● Implement a timer or a periodic update mechanism to automatically


refresh the displayed time at regular intervals.

e) Testing and Debugging:

● Test the application thoroughly by adding various cities and checking


if the time and date are displayed correctly.

Department of Computer Engineering, Pc Polytechnic


Group 50

● Verify the accuracy of time zone conversions by comparing the


displayed time with reliable online sources.

● Handle potential errors, such as incorrect time zone names or


network connectivity issues when retrieving the current time.

Here’s an example Python code for developing a World Clock


application using Tkinter

import tkinter as tk
import datetime
import pytz

class WorldClockApp:
def _init_(self):
self.cities = []
self.root = tk.Tk()
self.root.title("World Clock")
self.clock_labels = []
# Add cities to the city list
self.add_city("New York", "America/New_York")
self.add_city("London", "Europe/London")
self.add_city("Tokyo", "Asia/Tokyo")
self.create_ui()
self.update_clocks()
def add_city(self, city_name, timezone):
self.cities.append({"name": city_name, "timezone": timezone})
def create_ui(self):
for i, city in enumerate(self.cities):
label = tk.Label(self.root, text=city["name"], font=("Arial", 16,
"bold"))
label.grid(row=i, column=0, padx=10, pady=10)
self.clock_labels.append(label)

Department of Computer Engineering, Pc Polytechnic


Group 50

time_label = tk.Label(self.root, font=("Arial", 14))


time_label.grid(row=i, column=1, padx=10, pady=10)
self.clock_labels.append(time_label)
self.root.after(1000, self.update_clocks) # Update clocks every 1
second
def update_clocks(self):
current_time = datetime.datetime.now()
for i, city in enumerate(self.cities):
timezone = pytz.timezone(city["timezone"])
city_time = current_time.astimezone(timezone).strftime("%Y-
%m-%d %H:%M:%S")
self.clock_labels[i * 2 + 1].config(text=city_time)
self.root.after(1000, self.update_clocks) # Schedule the next
update
if _name_ == "_main_":
app = WorldClockApp()
app.root.mainloop()

In this code, we define a WorldClockApp class that handles the application


logic. The class initializes the UI using Tkinter, adds cities to the city list,
creates the user interface with labels for city names and time displays, and
updates the clocks every second.

To run this code, make sure you have Tkinter installed (it comes pre-
installed with most Python distributions). Save the code to a Python file
(e.g., world_clock.py) and execute it using the Python interpreter:

Example: Developing a World Clock Application

1. Import Required Libraries

import tkinter as tk
import datetime
import pytz

Department of Computer Engineering, Pc Polytechnic


Group 50

2. Create the WorldClockApp Class

class WorldClockApp:
def __init__(self):
self.cities = []
self.root = tk.Tk()
self.root.title("World Clock")
self.clock_labels = []

# Add cities
self.add_city("New York", "America/New_York")
self.add_city("London", "Europe/London")
self.add_city("Tokyo", "Asia/Tokyo")

self.create_ui()
self.update_clocks()

3. Define the add_city() Method

def add_city(self, city_name, timezone):


self.cities.append({"name": city_name, "timezone": timezone})

4. Create the User Interface (UI)

def create_ui(self):
for i, city in enumerate(self.cities):
label = tk.Label(self.root, text=city["name"], font=("Arial", 16, "bold"))
label.grid(row=i, column=0, padx=10, pady=10)
self.clock_labels.append(label)

time_label = tk.Label(self.root, font=("Arial", 14))


time_label.grid(row=i, column=1, padx=10, pady=10)
self.clock_labels.append(time_label)

Department of Computer Engineering, Pc Polytechnic


Group 50

5. Implement the update_clocks() Method

def update_clocks(self):
current_time = datetime.datetime.now(datetime.timezone.utc)
for i, city in enumerate(self.cities):
timezone = pytz.timezone(city["timezone"])
city_time = current_time.astimezone(timezone).strftime("%Y-
%m-%d %H:%M:%S")
self.clock_labels[i * 2 + 1].config(text=city_time)

self.root.after(1000, self.update_clocks)

6. Main Execution

if __name__ == "__main__":
app = WorldClockApp()
app.root.mainloop()

 Aims/benefits of the micro-project:

 Retrieve and Display Time Information: Implement the


functionality to fetch the current time from reliable sources or
APIs for various time zones. This may involve using Python
libraries or APIs that provide accurate time zone data.
 Time Zone Management: Enable users to add and remove time
zones of their choice, allowing them to customize the clock display
according to their preferences. Provide options to search and
select time zones from a list or map, ensuring flexibility and
convenience.
 Time Conversion: Implement the logic to convert the current
time from one time zone to another based on user selections. This
will enable users to compare and track time across different
locations effortlessly.

Department of Computer Engineering, Pc Polytechnic


Group 50

 Documentation: Create clear and concise documentation,


including an overview of the application, installation instructions,
user guide, and any necessary references or dependencies. This
will help users understand and utilize the application effectively.

 Intended Course Outcomes:

 Understand time zones and their importance in real-world applications using


Python.
 Learn to develop a real-time clock application using Python programming
language.
 Gain hands-on experience in GUI development using the Tkinter module in
Python.
 Use external Python libraries like pytz and datetime to manage and
display time from different countries.
 Improve coding and debugging skills through practical implementation of a
functional application.

 Actual methodology followed:

 The group members discussed the topic of project.


 Working of each student was given by leaders.
 We did the planning of the project.
 We collected information related to project.
 After gathering information, we studied about the topic.
 We distributed the task among the members of the group,
 Changes were made according to the requirements of projects and the report was
submitted along with presentation.
 The report was made of the same and is to be submitted.

 Literature Review:
The development of real-time clock applications has been an essential area
of study in the field of software development and time-based systems. As
the world becomes increasingly interconnected, keeping track of global
time zones has become crucial for individuals and organizations working
across different regions. Various studies and existing applications have
contributed significantly to understanding the implementation of world
clocks using different technologies and programming languages.

Department of Computer Engineering, Pc Polytechnic


Group 50

Traditional clock applications primarily relied on local system time, with


limited or no capability to manage different time zones dynamically.
However, with the advent of modern programming languages like Python, it
has become easier to develop robust and interactive world clock
applications that display real-time global time data.
Several researchers and developers have explored the use of Python's
datetime and pytz libraries to create efficient time management systems.
The datetime module provides classes for manipulating dates and times,
while pytz offers accurate and up-to-date timezone definitions. These
libraries allow developers to perform timezone conversions and display
accurate local times for various regions across the world.

 Actual resources Used:


Sr.no Name of the resources Specification Remarks
1. Textbook Python programming Used
2. MS word Windows 11 Used
3. Internet Wikipedia Used

 Skills developed learning outcomes of this micro project:


Sr.no Skills Remarks
1. Information collection 
2. Information analysis 
3. Design of project 
4. Programming skills 
5. Leadership 
6. Team management 
7. Planning 
8. Critical thinking 
9. Task management 
10. Creativity 
11. Develop project in deadline driven environment 
12. Familiar with subject knowledge 

Department of Computer Engineering, Pc Polytechnic


Group 50

 Output of the micro project:

Department of Computer Engineering, Pc Polytechnic


Group 50

Department of Computer Engineering, Pc Polytechnic


Group 50

 Applications of this micro project:

The micro-project of developing an application for a world clock with


Python can have several applications and benefits. Here are some potential
applications:
 Personal Time Management: The world clock application can be
used by individuals to manage their time effectively, especially
when they have to coordinate with people or events in different
time zones. It helps users stay organized and avoid confusion by
displaying multiple time zones in one place.
 Global Collaboration: In today's interconnected world, businesses
and teams often work across different time zones. The world clock
application can assist in scheduling meetings, coordinating tasks,
and maintaining effective communication among team members
located in various parts of the world.
 Travel Planning: When planning international trips, the world
clock application can help travelers keep track of time differences
and plan their itineraries accordingly. It allows users to easily
compare local time with the time in their destination, making
travel arrangements more convenient and efficient.

 Conclusion:
In conclusion, the development of an application for a World clock using
Python has been successfully executed. The application effectively allows
users to view the current time in different cities around the world. The key
findings and outcomes of the project are as follows:
 Functionalities: The application provides a user-friendly
interface with a list of cities to choose from. It accurately displays
the current time, taking into account time zones and daylight
saving adjustments.
 Python Libraries: The development of the application utilized
various Python libraries, such as datetime and pytz, which
facilitated efficient time calculations and conversions.
 Error Handling: Robust error handling mechanisms were
implemented to handle user input errors and ensure smooth

Department of Computer Engineering, Pc Polytechnic


Group 50

execution of the program. Error messages and prompts were


provided to guide the user in case of incorrect inputs.
 Modularity and Code Organization: The application code was
designed with modularity in mind, separating concerns and
implementing functions for specific tasks. This approach promotes
code reusability and ease of maintenance.
 User Experience: The user interface was designed to be intuitive and
visually appealing. The application provides clear instructions and
feedback to the user, enhancing the overall user experience.

 Action Plan:
SR. DETAILS OF ACTIVITY PLANNED PLANNED NAME OF RESPONSIBLE
NO START FINISHED TEAM MEMBER
DATE DATE
1) Topic given by subject
teacher and discussed Ganesh Korulkar
with given members.

2) Design of project
3) Planning of project
Ritesh Bharambe
4) Distribution of task and
discussion of role and
responsibilities of each
other
Sarthak Bhor
5) Collection of information
related to the topic

6) Analysed the collected


data and finalise Vaishnvi Korde
structure of the project
7) Report preparation
8) Implementation

Department of Computer Engineering, Pc Polytechnic


Group 50

Sign:

Department of Computer Engineering, Pc Polytechnic

You might also like