Gui Final AYU
Gui Final AYU
[PLC425B]
“Designing a GUI-based Python Application for Student
Information”
16-06-2025
SUBMITTED BY:
AYUSH THAKUR - 4MC24CS026
Computer Science and Engineering
Objective 1
Tools Used 2
Output Screenshots 7
Conclusion 8
Designing a GUI-based Python Application for Student Information
Design and develop a Python GUI application using the Tkinter library.
Create a simple user interface for entering student information such as:
o First Name
o Last Name
o Department
o Gender (Male / Female / Others)
This helps in understanding GUI development using Python and enhances practical coding
skills.
1
Designing a GUI-based Python Application for Student Information
Tools Used :
Programming Language
Python 3.10
GUI Library
Tkinter :
Tkinter is the built-in GUI (Graphical User Interface) toolkit that comes with Python.
It acts as a wrapper around the Tcl/Tk GUI toolkit and allows developers to create
desktop applications with windows, menus, buttons, forms, and more. Tkinter is easy
to learn and is especially useful for building small to medium-sized applications.
2
Designing a GUI-based Python Application for Student Information
SOURCE CODE:
import tkinter as tk
from tkinter import messagebox
# Validation
if not all([first, last, dept, gender]):
3
Designing a GUI-based Python Application for Student Information
# Save to file
with open("students.txt", "a") as f:
f.write(f"{first} {last}, Dept: {dept}, Gender: {gender}\n")
root.destroy()
5
Designing a GUI-based Python Application for Student Information
# Buttons
btn_submit = tk.Button(root, text="Submit Info",
command=submit_info, bg="#a5d6a7", width=15)
btn_submit.place(x=100, y=240)
7
Designing a GUI-based Python Application for Student Information
OUTPUT SCREENSHOTS:
1. GUI Window Screenshot
Shows the main application window with:
o Input fields for First Name, Last Name, Department
o Gender selection using radio buttons
o Login and Cancel buttons
Clean and centered layout with light blue background
8
Designing a GUI-based Python Application for Student Information
CONCLUSION:
Through this activity, I successfully designed and implemented a GUI-based Python
application using the Tkinter library to collect and display student information. I learned how
to create interactive user interfaces using widgets such as text boxes, radio buttons, and
buttons, and how to arrange them using layout managers like grid(). The activity enhanced
my understanding of event-driven programming, input handling, and message box integration
for user feedback.
What I Learned?
How to develop a GUI application in Python using Tkinter.
The use of Tkinter widgets like Entry, Radiobutton, Label, and Button.
How to manage layouts using the grid() method.
Writing functions to handle button events (Login and Cancel).
Displaying user input using message boxes (messagebox.showinfo).
Running and testing GUI code in Visual Studio Code.