Multiple choice quiz about Python - Part 4

Continue Python's thematic quiz, Part 4 goes back to the topic Core Data Type - Standard data types in Python. Let's try with Quantrimang to try the 10 questions below.

  1. Question 1: What kind of data is the object below?
     L = [1, 23, 'hello', 1] 
    1. List
    2. Dictionary
    3. Tuple
    4. Array
  2. Question 2: The output of the command below is:
     print "Hello World"[::-1] 
    1. dlroW olleH
    2. Hello Worl
    3. d
    4. Lỗi
  3. Question 3: Which result is the output of the code below?
     list = [ 'Tech', 404, 3.03, 'Beamers', 33.3 ] 
    print list[1:3]
    1. ['Tech', 404, 3.03, 'Beamers', 33.3]
    2. [404, 3.03]
    3. ['Tech', 'Beamers']
    4. None of the above
  4. Question 4: Where is not the standard data type in Python?
    1. List
    2. Dictionary
    3. Class
    4. Tuple
  5. Question 5: Where is the value of colors [2]?
     colors = ['red', 'orange', 'yellow', 'green', 'blue', 'indigo', 'violet'] 
    1. orange

    2. indigo

    3. blue

    4. yellow

  6. Question 6: What is the difference between tuple and list?
    1. Tuple in curly braces, list in square brackets oil.
    2. Tuple in square brackets, list in curly brackets.
    3. Tuple is a list with roman data, the list is a list with a normal data type.
    4. Data of type list can be changed, data of tuple type cannot be changed.
  7. Question 7: What is the output of the code below?
     mylist=[1, 5, 9, int('0')] 
    print(sum(mylist))
    1. 16
    2. 15
    3. 63
    4. There is no right answer.
  8. Question 8: The results of the printed program are:
     mylist=['a', 'aa', 'aaa', 'b', 'bb', 'bbb'] 
    print(mylist[:-1])
    1. [a, aa, aaa, b, bb]
    2. ['a', 'aa', 'aaa', 'b', 'bb', 'bbb']
    3. ['a', 'aa', 'aaa', 'b', 'bb']
    4. Lỗi
  9. Question 9: Which printout does the print job output for the program below?
     list1 = [1, 3] 
    list2 = list1
    list1[0] = 4
    print(list2)
    1. [4, 3]
    2. [1, 3]
    3. [1, 4]
    4. [1, 3, 4]
  10. Question 10: Run the following code in Python, the result is:
     num = '5'*'5' 
    1. 333

    2. 27

    3. 9

    4. LoạiError: không thể được phân tách từ không-số của kiểu 'str'

Update 24 May 2019
Category

System

Mac OS X

Hardware

Game

Tech info

Technology

Science

Life

Application

Electric

Program

Mobile