강의

멘토링

커뮤니티

Inflearn Community Q&A

tesla's profile image
tesla

asked

[Renewal] Python Introduction and Web Crawling Basics Bootcamp [Python, Web, and Data Understanding Fundamentals] (Updated)

Learning Python Fundamentals Most Naturally Through Problem-Solving: Loops and Various Data Structure Applications 1

43~45번 문제 질문있습니다!

Written on

·

262

0

'100 달러' 중간에 빈칸으로 나뉘어져 있어 .split()을 이용해야겠다는 느낌을 받아 이용해서 풀었습니다.

 

<44번 문제>

prices = input()

if prices.split()[1] == '달러':

    print(int(prices.split()[0])*1112, '원')

elif prices.split()[1] == '위안':

    print(int(prices.split()[0])*171, '원')

위와 같이 풀어도 괜찮죠?

웹-크롤링python

Answer 1

1

funcoding님의 프로필 이미지
funcoding
Instructor

안녕하세요. 

어휴 좋죠!!!! 원하는 결과만 나온다면, 어떻게든 풀어도 좋습니다. 정답이 잇는 것은 아니고요. 오히려 응용을 할 수 있는 역량이 되신다는 의미라서요. 그런 분들이 보다 잘하십니다. 단! 그런 응용을 할 때, 언제나 실행이 잘안될 수도 있어서, 항상 구글로 검색해보시는 습관을 같이 들이시면, 성장하실 수 있으실꺼예요~!

tesla's profile image
tesla

asked

Ask a question