Font size
Worksheets파이썬 기초 #2
Total questions: 13
Worksheet time: 7mins
파이썬 데이터 유형 중 숫자가 아닌 것은?
int
float
complex
str
x = 1.2 일 때 x의 타입은?
int
float
complex
str
random.randrange(1, 10) 의 출력에 대한 설명 중 옳은 것은?
1에서 9사이의 임의의 실수값
1에서 9사이의 임의의 정수값
1에서 10사이의 임의의 실수값
1에서 10사이의 임의의 정수값
print(int(35.9))
의 출력값은?
35
35.9
36
문자열의 길이를 구하는 함수는?
len( )
length( )
long( )
width( )
a = 'Hello World!'
print(a[4])
4
a[4]
l
o
a = '010-1234-5678'
끝번호 5678 을 슬라이싱하는 코드는?
a[5:8]
a[5678]
a[7:]
a[-4:]
a = 'apple,banana,melon'
a를 콤마 ',' 를 기준으로 분할하여 리스트로 바꾸는 코드는?
결과물 : ['apple', 'banana', 'melon']
a.upper( )
a.lower( )
a.strip(',')
a.split(',')
name = 'John'
print(f'My name is ______')
결과 : My name is John 일 때 알맞은 코드는?
(name)
'name'
{name}
[name]
이스케이프 문자 중 \n 의 동작과 비슷한 키는?
Enter
Del
Tab
Ins
다음 값 중 True 인 것을 모두 고르세요.
bool('Hello')
bool("")
bool(None)
bool(-1)
x = 5
x += 3
print(x**2)
위 코드의 출력값은?
9
10
64
100
x = 5
y = 3
print( x>8 or y<5)
x
y
True
False
