인프런 영문 브랜드 로고
인프런 영문 브랜드 로고

Inflearn Community Q&A

hellooguy's profile image
hellooguy

asked

Introduction to Python Algorithm Problem Solving (Coding Test Preparation)

2. Variable input and operators

unexpected EOF while parsing 가 발생합니다

Written on

·

6.4K

0

a, b=input("숫자를 입력하세요: ").split()

부분에서 숫자를 3 4 이런식으로 입력하는데 계속해서

Traceback (most recent call last):

  File "C:/Users/MAIN/Desktop/test.py", line 10, in <module>

    a, b=input("숫자를 입력하세요:").split()

  File "<string>", line 1

    2 3

        ^

SyntaxError: unexpected EOF while parsing

똑같이 했는데 이렇게 두 번째 인자 부분에서 에러가 발생합니다.

이유가 뭘까요? ㅠㅠ

python코테 준비 같이 해요!

Answer 1

0

codingcamp님의 프로필 이미지
codingcamp
Instructor

해당 코드의 문제는 없습니다. 다만 a, b에 3과 4가 int 아닌 str 형으로 입력됩니다. 주석처리가 잘 했는지 살펴보세요.

전체코드를 {;}를 이용해 올려주세요. 

hellooguy's profile image
hellooguy

asked

Ask a question