Font size
Worksheets25-26 sII gI quiz exercise I
Total questions: 30
Worksheet time: 16mins
What is the output?
5
3
8
a+b
What is the name of this function?
add
return
def
What is the output?
6
3
8
10
What is the name of this function?
substract
a
b
10
What is the output?
42
7
6
10
What is the output?
4.0
4
20
5
What is the output?
81
18
9
a
What is the output?
10.0
12
8
2
What is the output?
80.0
90.0
70.0
0
What is the output?
My name and surname is John Smith
My name and surname is name, surname
My name and surname
My name
What is the output?
The number is positive
The number is negative
The number is zero
Nothing
What is the error in this function?
Missing colon
Missing def
Indentation
Parameters
What is the error in this function?
Missing colon
Missing def
Indentation
Parameters
What is the error in this function?
Missing colon
Missing def
Indentation
Missing Parameter
What is the error in this function?
Missing colon
Missing def
Indentation
Missing Parameter
What is the output?
The bigger number is: 8
The bigger number is: 5
The bigger number is: 87
The bigger number is: 80
What is the output?
Negative
Positive or zero
Positive
Positive or zero
Negative
Positive or Negative
Negative
The function in python start with ?
(a)
Function in python should:
Start with def
have a name
have bracket after name
have a parameter
Function in python should:
Start with def
have a name
have bracket after name
have a parameter
After function is defined we have to add indentations?
True
False
If there are two returns inside the function second return is executed?
True
False
A function in Python is a named, self-contained block of reusable code that performs a specific task.
True
False
What type of data is the following?: X = "195.67"
Float
String
Boolean
Integer
What type of variable is the following?: Y = False
Float
String
Integer
Boolean
What does the following Python program print?
X = "Hello World!"
Y = "I can code "
Z = " In Python"
print( X + Y + Z)
Hello World! I can code In Python
Hello World!I can code In Python
Hello World! I can codeIn Python
Hello World!I can code In Python
float, integer, boolean, and string are all examples of what?
Variables
Data Types
Words
Concatenation
Which character is used to give comments in python program?
&
@
&
#
Which of the following is a correct variable name?
11A
Grade11#
Com11
my var
Which of the following is a correct variable name?
Act11
11myvar
quiz2$
my-var
