코리아 IT아카데미/python13 8일차 수업 | class StudentClass.py class Student: name = '' studentYear = 0 studentGroup = 0 studentNumber= 0 def setStudent_info(self, name, sYear, sGroup, sNum): self.name = name self.studentYear = sYear self.studentGroup = sGroup self.studentNumber = sNum def showStudent_info(self): print('') print(f'이름:{self.name}') print(f'학년:{self.studentYear}') print(f'반:{self.studentGroup}') print(f'번호:{self.studentNumber}.. 2021. 10. 4. 7일차 수업 | 사용자 함수~모듈 functionEx.py # 함수(function) # def 함수명(매개변수): # 함수 동작 소스코드 # return 반환데이터 def welcome(): print('Hello python') print('Nice to meet you') welcome() welcome() welcome() welcome() welcome() def make(material, count): bingsu = material + '빙수 ' print(bingsu) return bingsu + str(count) + '인분' print(make('딸기', 10)) print(make('인절미', 50)) #가변매개변수 def show(*args): print(type(args)) for item in args: prin.. 2021. 10. 4. 응용예제 | section6, 7 보호되어 있는 글 입니다. 2021. 9. 28. 응용예제 | ~section5. 보호되어 있는 글 입니다. 2021. 9. 27. 이전 1 2 3 4 다음