Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class course:
- def __init__(self,id:str,name:str,coursetype:str,point:float,period:int,group:str):
- self.id=id
- self.name=name
- self.point=point
- self.coursetype=coursetype
- self.period=period
- self.group=group
- pass
- def output(self):
- print('课程号',self.id)
- print('课程名',self.name)
- print('课程类型',self.coursetype)
- print('学分',self.point)
- print('学时',self.period)
- print('开课单位',self.group)
- if __name__=='__main__':
- c0=course('buaa123','单片机技术','专业基础课',3.5,48,'北航仪光')
- c0.output()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement