Multiple choice quiz about Python - Part 4
- Question 1: What kind of data is the object below?
L = [1, 23, 'hello', 1]
- List
- Dictionary
- Tuple
- Array
-
- Question 2: The output of the command below is:
print "Hello World"[::-1]
- dlroW olleH
- Hello Worl
- d
- Lỗi
-
- Question 3: Which result is the output of the code below?
list = [ 'Tech', 404, 3.03, 'Beamers', 33.3 ]
print list[1:3]
- ['Tech', 404, 3.03, 'Beamers', 33.3]
- [404, 3.03]
- ['Tech', 'Beamers']
- None of the above
-
- Question 4: Where is not the standard data type in Python?
- List
- Dictionary
- Class
- Tuple
-
- Question 5: Where is the value of colors [2]?
colors = ['red', 'orange', 'yellow', 'green', 'blue', 'indigo', 'violet']
-
orange
-
indigo
-
blue
-
yellow
-
- Question 6: What is the difference between tuple and list?
- Tuple in curly braces, list in square brackets oil.
- Tuple in square brackets, list in curly brackets.
- Tuple is a list with roman data, the list is a list with a normal data type.
- Data of type list can be changed, data of tuple type cannot be changed.
-
- Question 7: What is the output of the code below?
mylist=[1, 5, 9, int('0')]
print(sum(mylist))
- 16
- 15
- 63
- There is no right answer.
-
- Question 8: The results of the printed program are:
mylist=['a', 'aa', 'aaa', 'b', 'bb', 'bbb']
print(mylist[:-1])
- [a, aa, aaa, b, bb]
- ['a', 'aa', 'aaa', 'b', 'bb', 'bbb']
- ['a', 'aa', 'aaa', 'b', 'bb']
- Lỗi
-
- Question 9: Which printout does the print job output for the program below?
list1 = [1, 3]
list2 = list1
list1[0] = 4
print(list2)
- [4, 3]
- [1, 3]
- [1, 4]
- [1, 3, 4]
-
- Question 10: Run the following code in Python, the result is:
num = '5'*'5'
-
333
-
27
-
9
-
LoạiError: không thể được phân tách từ không-số của kiểu 'str'
-
4 ★ | 3 Vote
You should read it
- Multiple choice quiz about Python - Part 10
- Multiple choice quiz about Python - Part 5
- Multiple choice quiz about Python - Part 6
- Multiple choice test on Python - Part 11
- Multiple choice quiz about Python - Part 2
- Multiple choice quiz about Python - Part 8
- Multiple choice quiz about Python - Part 1
- Multiple choice quiz about Python - Part 9
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.