Clear, practical technology insights About · Contact

Multiple Choice Test on Python - Part 11

Review Multiple Choice Test on Python - Part 11 with focused questions, clear answer guidance, and practical takeaways to strengthen your understanding.

Published: 3 minutes read
Table of Contents

This article presents Multiple Choice Test on Python - Part 11 in a clear, structured format. It helps readers review key concepts, test their understanding, and learn from the material.

Understanding Multiple Choice Test on Python

  1. Question 1: What is the variable declared outside the function?
    1. Global variable (Global)
    2. Local variable (Local)
    3. Static variable (Static)
    4. Automatic variable (Automatic)
  2. Question 2: What is the variable declared inside a function called?
    1. Global variable (Global)
    2. Local variable (Local)
    3. Automatic variable (Automatic)
    4. Volatile variable
  3. Question 3: What is the output of the program below?
    i=0
    def change (i):
    i=i+1
    return i
    change (1)
    print (i)
    1. first
    2. 0
    3. Do not show results
    4. An exception occurs
  4. Question 4: What is the output of the program below?
    def a (b):
    b = b + [5]
    c = [1, 2, 3, 4]
    a (c)
    print (len (c))
    1. 4
    2. 5
    3. first
    4. An exception occurs
  5. Question 5: What is the output of the program below?
    a=10
    b=20
    def change ():
    global b
    a=45
    b=56
    change ()
    print (a)
    print (b)
    1. ten 56
    2. 45 56
    3. ten 20
    4. Syntax Error
  6. Question 6: What is the output of the program below?
    def change (i = 1, j = 2):
    i = i + j
    j = j + 1
    print (i, j)
    change (j = 1, i = 2)
    1. An exception occurs
    2. twelfth
    3. 3 3
    4. 3 2
  7. Question 7: What is the output of the program below?
    def change (one, *two):
    print (type (two))
    change (1,2,3,4)
    1. Integer
    2. Tuple
    3. Dictionary
    4. List
  8. Question 8: What is the output of the program below?
    def display (b, n):
    while n > 0:
    print (b, end="")
    n=n-1
    display ('z',3)
    1. zzz
    2. zz
    3. An exception occurs
    4. An infinite loop
  9. Question 9: What is the output of the program below?
    def find (a, **b):
    print (type (b))
    find ('letters', A='1', B='2')
    1. String
    2. Tuple
    3. Dictionary
    4. List
  10. Question 10: What is the output of the program below?
    x = 2
    def vidu ():
    global x
    y = "Biến cục bộ"
    x = x * 2
    print (x)
    print (y)
    vidu ()
    1. 4 Local variable
    2. Local variable

      4

    3. 2 Local variable
    4. Exception

Frequently Asked Questions

What is the main point of Multiple Choice Test on Python - Part 11?

Question 1: What is the variable declared outside the function? Global variable (Global) Local variable (Local) Static variable (Static) Automatic variable (Automatic) Automatic variable (Automatic) Question 2: What is the variable declared inside a function called?

Why is Multiple Choice Test on Python - Part 11 important?

Multiple Choice Test on Python - Part 11 matters because it can affect how readers understand, choose, use, or respond to the subject discussed in the article.

What should readers verify about Multiple Choice Test on Python - Part 11?

Check the date, product or software version, compatibility, and any current guidance before acting, especially when technology, security, health, or pricing is involved.

Was this article helpful?

Your feedback helps us improve.

Discussion

Reader Comments 0

Sign in with email or Google to join the discussion.