From 9198ac68a36727259da8aec26b493b56b6d882ba Mon Sep 17 00:00:00 2001 From: Rohit Agrawal <110839621+rohitagr0310@users.noreply.github.com> Date: Sun, 8 Oct 2023 17:18:16 +0530 Subject: [PATCH] Added GUI for the Application --- CS_Source Code.py | 46 ++++++------- .../file_operations.cpython-311.pyc | Bin 0 -> 1634 bytes GUI/__pycache__/student.cpython-311.pyc | Bin 0 -> 1190 bytes GUI/file_operations.py | 25 +++++++ GUI/gui.py | 61 ++++++++++++++++++ GUI/stud.dat | Bin 0 -> 154 bytes GUI/student.py | 16 +++++ stud.dat | Bin 441 -> 519 bytes 8 files changed, 125 insertions(+), 23 deletions(-) create mode 100644 GUI/__pycache__/file_operations.cpython-311.pyc create mode 100644 GUI/__pycache__/student.cpython-311.pyc create mode 100644 GUI/file_operations.py create mode 100644 GUI/gui.py create mode 100644 GUI/stud.dat create mode 100644 GUI/student.py diff --git a/CS_Source Code.py b/CS_Source Code.py index 6a8d628..da0891c 100644 --- a/CS_Source Code.py +++ b/CS_Source Code.py @@ -16,31 +16,31 @@ class used class student(object): - def __int__(s): - s.roll = 0 - s.name = "" - s.per = 0 - - def add_rec(s): - s.roll = int(input("Enter roll number: ")) - s.name = input("Enter name: ") - s.name = s.name.upper() - s.per = float(input("Enter percentage: ")) - - def disp_rec(s): - print("roll number: ", s.roll) - print("name: ", s.name) - print("percentage: ", s.per) - - def display_rec(s): - print("%-10s" % s.roll, "%-20s" % s.name, "%-10s" % s.per) + def __init__(self): + self.roll = 0 + self.name = "" + self.per = 0 + + def add_rec(self): + self.roll = int(input("Enter roll number: ")) + self.name = input("Enter name: ") + self.name = self.name.upper() + self.per = float(input("Enter percentage: ")) + + def disp_rec(self): + print("roll number: ", self.roll) + print("name: ", self.name) + print("percentage: ", self.per) + + def display_rec(self): + print("%-10s" % self.roll, "%-20s" % self.name, "%-10s" % self.per) # print("in display_rec") - def modify_rec(s): - s.roll = int(input("Enter new roll number: ")) - s.name = input("Enter new name: ") - s.name = s.name.upper() - s.per = float(input("Enter new percentage: ")) + def modify_rec(self): + self.roll = int(input("Enter new roll number: ")) + self.name = input("Enter new name: ") + self.name = self.name.upper() + self.per = float(input("Enter new percentage: ")) def write_record(): diff --git a/GUI/__pycache__/file_operations.cpython-311.pyc b/GUI/__pycache__/file_operations.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..20aaa4da4f334b2c674478ffbd5fa84d8818b568 GIT binary patch literal 1634 zcma)7O=ufO6n?Wm`iXucr*fkPw3ds4>MBr(8znUX(KsQL#a>yZvU zJpcy|BECm$ggtPBdBREw6%H`^;b;d~gc>oq|FC^Bwp5`?rhN&|1p8@i(K8QkfFV_c zO>q?}gup5g>{QIaJeWMAVS5$WrJ6t`(>>AvRD}b~@Nk^vH}G7@39GnIP54~M495zo zz#w`;zIW_0%rd<~RnrpGwe6SQ*K#_eib|FkD*kS$3sX+_IX z%I7{UXqH6F8zsxVyqVKVW?nB^qG7UxXgPUQt!P>j4`30^;1{DP%JGM9-^kuKG-hO( z{&C*St`xOfEdQC7y`|^M8@R;C@*NaIFSDGM%?#os-&Kq1y2kCv%$8wl8`(Se?`C=M zhv?2!zPWLwv}JiKEN^NLnSBlxz+Gj0jb9LUpeM+3tm`}f^tFB3^3At>^F1K$%XPEs z4Lx~h-&w!V^2XcVc+(s2iD|-`^3`Zk{=lC+1Ca@d6Dt_lh;Rh+@{82>VCz5jh%!LLy zm%c1EJm=Ffv2lrTIVL0KaP7E_$^8$i_Fx@q|BK*Q1ZPv6OjEBWRH1&tbG$E-v@T6% z6X^iO!|`-F8i6NEXBS2l?82}=0E5L?7&3t>aN=jc^o~OUS{ztP(mEN~PLu)TDOmzr z`(XRxZ6uYF)5`^_6m?Ts(-clfjm{;UjNck_a$l*StJHF+CA3k?PxD5ppl%I$XStSF zZre3uIq$C60xyaIDGkPRVjhH1RWLsfIWr2P77D{a274JT+-m%aumc@`aOX}>aLdV4 zG#1_0>t;_7eAl}X<=H}=wjvAd$ih=+Cpf$3-}UcTevdBx7F}#bueGDsTESF1m}&-7 zJsDT@L|om2DX@t=r5QN5AUONjk4&E7B%Yl>ClG$@=e_F*acyz}o!~+<@OslVd^nkt zoXl78NRNW)D13D@9TFQMDIIn;!Xhdf7YUam5|^Xi^pe;}+V~bhIU(A=fnDA91$_@k y7z*rbJa#Q@=(JqWZn9TU$3KR~n+UioAuqtUWA~oJL9h(R5b_XA_`ksT|Hi+Y{dv#; literal 0 HcmV?d00001 diff --git a/GUI/__pycache__/student.cpython-311.pyc b/GUI/__pycache__/student.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..3cddac5ef18a1feb34570b71072b9afea6c1a771 GIT binary patch literal 1190 zcmZ`%y=xRf6rb6TwA+fv) zut|1B#x94bZgg!Wj0*M&1Fi zf!#*Vb(ee|fvK>(Zt)omgX<-&7hEj3-BHJbu>hs$Jmqk`VGNhL;EGW=S6l$lL!$Xj zu!d|mYn_baOvdr7A4``v0f6UZhG(hOsQ8x{^XEaCvzG@xMs72h&h literal 0 HcmV?d00001 diff --git a/GUI/student.py b/GUI/student.py new file mode 100644 index 0000000..b3bbdc8 --- /dev/null +++ b/GUI/student.py @@ -0,0 +1,16 @@ +# student.py + + +class Student: + def __init__(self): + self.roll = 0 + self.name = "" + self.per = 0 + + def add_record(self, roll, name, per): + self.roll = roll + self.name = name.upper() + self.per = per + + def display_record(self): + return f"Roll Number: {self.roll}\nName: {self.name}\nPercentage: {self.per}" diff --git a/stud.dat b/stud.dat index 1fe08aaff338fc9142d9730491ec40e8e9aff3c1..f7a90c5798837fd1be622c2e46632836da356c36 100644 GIT binary patch delta 46 zcmdnV+|IILCnHM(%T(uy(K>RBJuG>Nxv5in7=xztFc+j2O>uYdZ(sm{(j+|qXmAcj delta 7 OcmZo?*~z?NCnEp~`~tE7