Multiple choice quiz about Python - Part 4

  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'

4 ★ | 3 Vote

May be interested

  • Multiple choice quiz about Python - Part 5Photo of Multiple choice quiz about Python - Part 5
    if you are interested in learning about the python programming language, the following quiz of network administrator will provide useful knowledge for your learning.
  • What do you know about Data Mining? - Part 2Photo of What do you know about Data Mining?  - Part 2
    how much did you know about data mining? keep testing your knowledge with quantrimang through the following multiple choice questions!
  • What do you know about Data Mining? - Part 1Photo of What do you know about Data Mining?  - Part 1
    how much did you know about data mining? try your knowledge with quantrimang through the following data mining quiz questions!
  • Multiple choice quiz about Python - Part 6Photo of Multiple choice quiz about Python - Part 6
    to help readers add to their knowledge of python's built-in functions, the network administrator will send you multiple choice questions on this topic. please try.
  • Test about database security P11Photo of Test about database security P11
    testing of databases will help you gain more useful knowledge about this topic to apply to learning and working. the question set will have 10 sentences to test your knowledge.
  • Test your understanding about hackingPhoto of Test your understanding about hacking
    hacker is a job that brings a lot of income and is loved by many people. to become a true hacker you need to cultivate a lot of useful knowledge. the network administrator's quiz below will help you gain the knowledge to start your career as a hacker.