Question 4: What is the output of the program below?
def printMax(a, b): if a > b: print(a, 'is maximum') elif a == b: print(a, 'is equal to', b) else: print(b, 'is maximum') printMax(3, 4)
3
4
4 is maximum
There is no right answer
Question 5: What is the output of the program below?
x = 50 def func(x): print('Giá trị của x là', x) x = 2 print('Giá trị của x được thay đổi thành', x) func(x) print('Giá trị hiện tại của x là', x)
The current value of x is 50
The current value of x is 100
The current value of x is 2
There is no right answer
Question 6: What is the output of the program below?
x = 50 def func(): global x print('Giá trị của x là', x) x = 2 print('Giá trị của x được thay đổi thành', x) func() print('Giá trị hiện tại của x là', x)
The value of x is 50 The value of x is changed to 2 The current value of x is 50
The value of x is 50 The value of x is changed to 2 The current value of x is 2
The value of x is 50 The value of x is changed to 50 The current value of x is 50
There is no right answer
Question 7: What is the output of the program below?