from tkinter import * master = Tk() Label(master, text='Student Management System').grid(row=0) Label(master, text='Name

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899604
Joined: Mon Aug 02, 2021 8:13 am

from tkinter import * master = Tk() Label(master, text='Student Management System').grid(row=0) Label(master, text='Name

Post by answerhappygod »

from tkinter import *
master = Tk()
Label(master, text='Student Management System').grid(row=0)
Label(master, text='Name').grid(row=1)
Label(master, text='Major').grid(row=2)
Label(master, text='Grad Year').grid(row=3)
e1 = Entry(master)
e2 = Entry(master)
e3 = Entry(master)
e1.grid(row=0, column=1)
e2.grid(row=1, column=1)
e3.grid(row=2, column=1)
mainloop()
ok guys I need to figure out how to get this to accept user
input if you could help me that would be awesome
it needs to accept and store 3 entries but I cant figure out how
to if you guys could help me that would be great
here are the other files I am using the test
class Student:
def __init__(self, name, major, year):
self.name = name
self.major = major
self.year = year
def student_info(self):
ret_str = f"Student name:
{self.name}"
ret_str = ret_str + "\n" + f"Major:
{self.major}"
ret_str = ret_str + "\n" + f"Grad Year:
{self.year}"
return ret_str
if __name__ == "__main__":
me = Student("John", "DD", 2025)
print(me.student_info())
me.major = "CS"
print(me.student_info())
here is the test cases file which gives the inputs for the
code
# to import the student class
import student as s
# to create an object and print it out
me = s.Student("John", "DD", 2025)
print(me.student_info())
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply