Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to develop Campus Management system based on Python

2025-03-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/03 Report--

This article mainly explains "Python actual combat value how to develop campus management system". The content of the article is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn "Python actual combat value how to develop campus management system".

Python is now developing a campus management system, including all kinds of personnel, such as teachers, students and so on. The school system usually includes some course information.

For example, a campus management system is now developed, which includes all kinds of personnel, such as teachers, students and so on. School systems usually include information about courses.

Teacher information includes: name, sex, age, job number, teaching age, professional title, teaching course and so on. Student information includes: name, gender, age, student number, admission time, college, major and so on. Course information includes: course number, assessment method, course information and so on. Courses may include theoretical courses, practical courses and so on. How to design a more reasonable form of organization, which can describe these information and combine the relevant information.

There are six classes: the Teacher class inherits the lecture class and the public class. Student class inherits lecture class, public class lecture class inherits lecture_message class. Come on, Qiu Li Ointment!

The code is as follows:

Class public (): def _ _ init__ (self,name,sex,age): self.name = name self.sex = sex self.age = ageclass lecture_massage (): def setsno_lec (self,sno): self.sno = sno def setexam (self,exam): self.exam = exam def setmassgae (self,massage): self.massage = massageclass lecture (lecture_massage): def settheory (self Theory): self.theory = theory def setpratice (self,pratice): self.pratice = praticeclass Teacher (public,lecture): def setsno (self,sno): self.sno = sno def setenrool (self,enroll): self.enroll = enroll def set_pos (self,pos): self.pos = pos def set_lecture (self Lecture): self.lecture = lecture def per_tea (self): print ("my name is:% s\ nSex:% s\ nAge:% d\ nJob number:% s\ nTeaching seniority:% d\ nProfessional title:% s\ n"Teaching course:\ nTheory course:% s\ n No.:% s\ nAssessment method:% s\ nCurriculum Information:% s"% (self.name) Self.sex,self.age,self.sno,self.enroll,self.pos,self.theory,self.sno,self.exam,self.massage) def say (self): print ("stand up!") Def say1 (self): print ("Hello, class, please have a seat. Let me briefly introduce myself:\ n ") class student (public): def setsno (self,sno): self.sno = sno def setenrol (self,enrol): self.enroll = enrol def setcollage (self,collage): self.collage = collage def setmajor (self) Major): self.major = major def per_stu (self): print ("my name is:% s\ nSex:% s\ nAge:% d\ nStudent ID:% s\ nadmission time:% s\ nCollege:% s\ nSpecialty:% s"% (self.name, self.sex, self.age, self.sno, self.enroll, self.collage) Self.major) def say (self): print ("Hello teacher!") Def say1 (self): print ("Let me also introduce myself:") if _ _ name__ = ='_ _ main__': stu = student ("Lu Benwei", "male" 19) stu.setsno ("19250503mm *") stu.setenrol ("2019-9-1") stu.setcollage ("Cappuccino College") stu.setmajor ("pour Aunt a cappuccino major") tea = Teacher ("Chen Dao Tsai", "male" 33) tea.setsno ("1925050 games *") tea.setenrool (20) tea.set_pos ("God of gamblers closed disciple") tea.settheory ("data structure") tea.setsno_lec ("1234567") tea.setexam ("written test") tea.setmassgae ('data structure is the way computers store and organize data. A data structure is a collection of data elements that have one or more specific relationships with each other. In general, carefully selected data structures can lead to higher operational or storage efficiency. Data structures are often related to efficient retrieval algorithms and indexing techniques. Tea.say () stu.say () tea.say1 () tea.per_tea () print ("\ n") stu.say1 () stu.per_stu ()

The running results are as follows:

Thank you for your reading. the above is the content of "how to develop campus management system with Python actual combat value". After the study of this article, I believe you have a deeper understanding of how to develop campus management system with Python actual combat value, and the specific use needs to be verified by practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report