Python
클래스 공부중인데 왜 오류가 뜨는지 모르겠습니다..
class FourCal:
	def setdate(self,first,second):
		self.first=first
		self.second=second
		
	def add(self):
		result=self.first+self.second
		return result
		
a=FourCal()
a.setdate(4.2)
print(a.add())

4랑2를 더한 6이 출력되야 하는데 오류가 뜹니다..

왜 그런건지 이유를 알고 싶습니다!

댓글 2