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