인프런 커뮤니티 질문&답변
Chapter 05 - 1 함수
작성
·
315
0
안녕하세요. 양질의 강의 항상 감사드립니다.
아래와 같은 코드를 강의 영상과 똑같이 작성 하였는데,
계속 에러가 나옵니다ㅠㅠ 어떤부분이 잘못 되었는지
알려주신다면 감사하겠습니다.
def first_func(w1):
print("Hello, ", w1)
word = 'Luego'
first_func(word)
# 예제 2
def return_func(w1):
value = "Hello, ", + str(w1)
return value
x = return_func('Hasta')
print(x)
Hello, Luego Traceback (most recent call last): File "c:\python basic\Python examples\Chapter05_01.py", line 25, in <module> x = return_func('Hasta') File "c:\python basic\Python examples\Chapter05_01.py", line 22, in return_func value = "Hello, ", + str(w1) TypeError: bad operand type for unary +: 'str' PS C:\python basic>





