(+84) 236.3827111 ex. 402

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


Q 6 - Which of the following function returns a randomly selected element from range?

A - choice(seq)

B - randrange ([start,] stop [,step])

C - random()

D - seed([x])

Q 7 - Which of the following function gets the length of the string?

A - isupper()

B - join(seq)

C - len(string)

D - ljust(width[, fillchar])

Q 8 - Which of the following function converts a string to all lowercase?

A - lower()

B - lstrip()

C - max(str)

D - min(str)

Q 9 - What is the output of 3 in [1, 2, 3]?

A - true

B - false

C - Error

D - None of the above.

Q 10 - What is the following function compares elements of both dictionaries dict1, dict2?

A - max(dict)

B - min(dict)

C - len(dict)

D - None of the above.