(+84) 236.3827111 ex. 402

Một số câu hỏi trắc nghiệm về lập trình Python - 1


Q 1 - Is python a case sensitive language?

A - true

B - false

Q 2 - What is the output of print str[2:5] if str = 'Hello World!'?

A - llo World!

B - H

C - llo

D - None of the above.

Q 3 - What is the output of print tuple[0] if tuple = ( 'abcd', 786 , 2.23, 'john', 70.2 )?

A - ( 'abcd', 786 , 2.23, 'john', 70.2 )

B - abcd

C - Error

D - None of the above

Q 4 - Which of the following function convert a String to an object in python?

A - repr(x)

B - eval(str)

C - tuple(s)

D - list(s)

Q 5 - Which of the following function convert a single character to its integer value in python?

A - unichr(x)

B - ord(x)

C - hex(x)

D - oct(x)