NEW
Font size
WorksheetsPython3
Total questions: 10
Worksheet time: 5mins
What will be the result of the code below
x, y, z = "Orange", "Banana", "Cherry"
print(x)
"Orange", "Banana", "Cherry"
"Banana",
"Banana", "Cherry"
"Orange"
x = y = z = "Mango"
print(x)
print(x)
"Mango"
banana
orange
What is the result of the code below?
fruits = ["apple", "banana", "cherry"]
x, y, z = fruits
print(z)
"apple"
"cherry"
banana
None
The Python print statement is often used to output variables.
True
False
None
Run the code below
x = "awesome"
print("Python is " + x)
"Python awesome is "
"awesome is "
"Python
Python is awesome
None
x = "Python is "
y = "awesome"
z = x + y
What code will you write to bring out the result of z
print(z)
print(x)
print(y)
print(yz)
x = "awesome"
def myfunc():
print("Python is " + x)
myfunc()
"Python is
"Python is awesome"
"Python is banana"
"Python is apple"
When you create a variable inside a function, that variable is local, and can only be used inside that function.
True
False
None
All
What type of variable is this?
myVariableName = "John"
Pascal Case
Camel Case
Snake Case
All
Is this variable name acceptable?
2myvar = "John"
Yes
No
I dont know
