"Python 기초를 위한 Quiz"의 두 판 사이의 차이

(새 문서: ==문자열 연결== 1) 빈 공간에 들어갈 문자열은 ? <source lang="python"> >>> "Hello" + '_____ 'Hello world </source> 답 : <span style="color:white">world'</span>)
 
1번째 줄: 1번째 줄:
==문자열 연결==
==문자열 연결==
1) 빈 공간에 들어갈 문자열은 ?
1. 빈 공간에 들어갈 문자열은 ?  
<source lang="python">
<source lang="python">
>>> "Hello" + '_____
>>> "Hello" + '_____
6번째 줄: 6번째 줄:
</source>
</source>
답 : <span style="color:white">world'</span>
답 : <span style="color:white">world'</span>
2. 실행 결과는 ?
<source lang="python">
>>> "4" + "4"
</source>
답 : <span style="color:white">'44'</span>
3. 실행 결과는 ?
<source lang="python">
>>> 1 + "5"
</source>
답 : <span style="color:white">TypeError: unsupported operand type(s) for +: 'int' and 'str'</span>
4. 에러를 발생하는 식은 ?<br>
1) "4" + 'you'<br>
2) '7' + 3<br>
3) "three" + "4"<br>
4) 3 + 2<br>
답 : <span style="color:white">2)</span>

2016년 7월 1일 (금) 13:35 판

문자열 연결

1. 빈 공간에 들어갈 문자열은 ?

>>> "Hello" + '_____
'Hello world

답 : world'

2. 실행 결과는 ?

>>> "4" + "4"

답 : '44'

3. 실행 결과는 ?

>>> 1 + "5"

답 : TypeError: unsupported operand type(s) for +: 'int' and 'str'

4. 에러를 발생하는 식은 ?
1) "4" + 'you'
2) '7' + 3
3) "three" + "4"
4) 3 + 2
답 : 2)

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}