대표적인 Online Coding Test Site
https://www.tutorialspoint.com/python/python_online_test.htm
Q 1 - What is the following function returns the lowest index in list that obj appears?
A - list.index(obj)
B - list.insert(index, obj)
C - list.pop(obj=list[-1])
D - list.remove(obj)
Q 2 - What is the output of [1, 2, 3] + [4, 5, 6]?
A - [1, 2, 3, 4, 5, 6]
B - [1, 2, 3],[4, 5, 6]
C - [5, 7,9]
D - 21
Q 3 - Which of the following function checks in a string that all characters are whitespaces?
A - islower()
B - isnumeric()
C - isspace()
D - istitle()
Q 4 - What is the output of L[-2] if L = [1,2,3]?
A - 1
B - 2
C - 3
D - None of the above.
Q 5 - Which of the following statement causes the loop to skip the remainder of its body and immediately retest its condition prior to reiterating?
A - break
B - continue
C - pass
D - None of the above.
Q 6 - Which of the following environment variable for Python contains the path of an initialization file containing Python source code?
A - PYTHONPATH
B - PYTHONSTARTUP
C - PYTHONCASEOK
D - PYTHONHOME
Q 7 - What is the output of print list[1:3] if list = [ 'abcd', 786 , 2.23, 'john', 70.2 ]?
A - [ 'abcd', 786 , 2.23, 'john', 70.2 ]
B - abcd
C - [786, 2.23]
D - None of the above.
Q 8 - What is the output of print(list) if list = [ 'abcd', 786 , 2.23, 'john', 70.2 ]?
A - [ 'abcd', 786 , 2.23, 'john', 70.2 ]
B - list
C - Error
D - None of the above.
Q 9 - Which of the following function convert an integer to octal string in python?
A - unichr(x)
B - ord(x)
C - hex(x)
D - oct(x)
Q 10 - What is the output of print(tinylist * 2) if tinylist = [123, 'john']?
A - [123, 'john', 123, 'john']
B - [123, 'john'] * 2
C - Error
D - None of the above.
'알고리즘 > 코딩테스트 문제풀기' 카테고리의 다른 글
testdome 코딩 테스트 문제 풀기 (0) | 2020.12.23 |
---|