class HelloWorld:
def __init__(self):
print("hello World' Just one more time")
def __del__(self):
print("Good bye")
def performAverage(self, val1, val2):
average = (val1 + val2) / 2
print("The average of the scores is : ", average)
def main():
world = HelloWorld()
score1, score2 = input("Enter two scores separted by a comma : ")
world.performAverage(score1,score2)
main()
첫번쨰 질무은 교수님꼐서는 print " " 쓰시는데 저는 ()를 안넣으면 오류가나는데 이유가궁금합니다.
두번쨰질문은
Traceback (most recent call last):
File "C:/Users/LG/PycharmProjects/untitled/11.py", line 17, in <module>
main()
File "C:/Users/LG/PycharmProjects/untitled/11.py", line 13, in main
score1, score2 = input("Enter two scores separted by a comma : ")
ValueError: too many values to unpack (expected 2)
수업시간같이 똑같이 타이핑했는데 이런오류가 나는데 어디서 잘못한건지 알려주시면 감사하겠습니다
좋은강의 해주셔서 감사합니다.
comment