Multiple choice quiz about Python - Part 8
- Question 1: Which of the following functions only accepts integers as parameters?
- ord ()
- min ()
- chr ()
any ()
-
- Question 2: Suppose there is a list: l = [2,3,4]. If you want to print this list in reverse order, which of the following methods should you use?
- reverse (l)
- list (reverse [(l)])
- reversed (l)
- list (reversed (l))
-
- Question 3: What is the output of the following function?
float(' -12345n')
- -12345.0 (5 spaces before the number)
- -12345.0
- Lỗi
- -12345.000000000 . (infinite decimal number)
-
- Question 4: What is the result of the function shown below?
ord(65)
ord('A')
- A
65 - Lỗi
65 - A
Lỗi - Lỗi
Lỗi
-
- Question 5: What is the result of the following function?
float('-infinity')
float('inf')
- -Inf
inf - –Infinity
inf - Lỗi
Lỗi - Lỗi
Junk value
-
- Question 6: Which of the following functions will not cause errors when not passing parameters to it?
- min ()
- divmod ()
- all ()
- float ()
-
- Question 7: What is the result of the following expression?
hex(15)
- f
- 0xF
- 0Xf
- 0xf
-
- Question 8: Which of the following functions does not cause errors?
- ord ()
- ord ('')
- ord (")
- ord ("")
-
- Question 9: What is the result of the function shown below?
len(["hello",2, 4, 6])
- 4
- 3
- Lỗi
- 6
-
- Question 10: What is the result of the following function?
oct(7)
oct('7')
- Lỗi
07 - 07
Lỗi - 0o7
Lỗi - 07
0o7
-
5 ★ | 1 Vote
You should read it
- Multiple choice quiz about Python - Part 3
- Multiple choice quiz about Python - Part 7
- Multiple choice quiz about Python - Part 5
- Multiple choice quiz about Python - Part 6
- Multiple choice quiz about Python - Part 2
- Multiple choice test on Python - Part 11
- Multiple choice quiz about Python - Part 9
- Multiple choice quiz about Python - Part 1
May be interested
- eQuiz - VB.NET testing test - Part 2in the previous article, i showed you the first part of the vb.net test. and this time, we will continue with part 2 of this popular quiz series on programming languages, the whole test will have 15 questions with unlimited response time.
- eQuiz - Multiple choice test on JDBC - Part 1in the quiz below, we will introduce you to part 1 of the jdbc basic knowledge test series with 15 questions.
- eQuiz - Quiz on Core Java - Part 2in the quiz below, you will be able to try out part 2 of the series related to core java - one of the most popular programming languages today. in total, the test will have 15 questions in the form of multiple choice, with an unlimited response time ...
- JAVA P8 test quizif you are interested in learning about the java programming language, the following quiz of network administrator will provide you with a lot of useful knowledge for your learning.
- Testing of computer architecture - Part 2next to this topic, in the quiz below will be more challenging, let's start.
- What do you know about iPhone? Doing this test will be clear (part 2)do multiple-choice questions about iphone in part 1 make it difficult for you? try the next 10 questions about the iphone.
- Multiple choice questions about Photoshop - Part 1a set of multiple-choice questions about photoshop for you to try and understand.
- [QUIZ] Test your understanding of SQL - Part 5multiple-choice questions on sql help you familiarize and review useful knowledge for work and learning sql language.
- What do you know about iPhone? Doing this test will be clear (part 1)as a smartphone user, maybe also holding the iphone in your hand, what do you really know about this apple pet's baby? let's take the quiz below to answer that question.
- [QUIZ] Test your understanding of SQL - Part 4let's try our knowledge with multiple choice questions about sql database management system.