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

1번째 줄: 1번째 줄:
==문자열 연결==
==문자열==
1. 빈 공간에 들어갈 문자열은 ?  
1. 빈 공간에 들어갈 문자열은 ?  
<source lang="python">
<source lang="python">
31번째 줄: 31번째 줄:
</source>
</source>
답 : <span style="color:white">555</span>
답 : <span style="color:white">555</span>
==입력과 출력==
1. 실행 결과는 ?
<source lang="python">
>>> print(3+3)
</source>
답 : <span style="color:white">6</span>
2. 실행 결과는 ?
<source lang="python">
>>> print('Jerry\nTom')
</source>
답 : <br>
<span style="color:white">Jerry</span><br>
<span style="color:white">Tom</span>

2016년 7월 1일 (금) 17:27 판

1 문자열

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)

2. 실행 결과는 ?

>>> print(3 * "5")

답 : 555

2 입력과 출력

1. 실행 결과는 ?

>>> print(3+3)

답 : 6

2. 실행 결과는 ?

>>> print('Jerry\nTom')

답 :
Jerry
Tom

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