NEW
Font size
WorksheetsTerm3 - Gerade 5 - Revision
Total questions: 42
Worksheet time: 21mins
What Python syntax should I use to output "Hello World"?
print("Hello World”)
p("Hello World")
echo "Hello World"
Which function in Python is used to display the output?
type()
print()
output()
In Python, how do you create a numeric variable with the value 6 ?
X=6
X=”6“
X=x6
In Python, which operator is used to multiply numbers?
x
%
*
Python variables could be .....................
containers for storing data values.
a number, positive or negative, with one or more decimals.
a whole number, positive or negative, without decimals, of unlimited length .
Which Python operator is used to divide numbers?
x
%
/
Any object's data type can be determined by which function?
type()
print()
output()
What is the missing part of the code below to output Hello, World! ?
output
show
.................... is a whole number, positive or negative, without decimal point
Integer
String
Float
What is the output of the following python code?
A=10
B=20
C=A+B
print(“The sum is: ”,C)
The sum is: 30
30
The sum is: A+B
Which of the following is an example of a variable name in python?
Car name
Car.name
Car_name
Which of the following is an example of invalid variable names in python?
Employee code
10 code
A.B.C. code
all of the them
none of the them
Which data type represents floating point values?
Integer
String
Float
Which of the following data types is not a datatype in Python
Number
String
Float
The data type for 12.4 should be................
Number
String
Float
The data type for -100 should be................
Integer
String
Float
......................... is the area where you type the code.
Work area
Worksheet
Script area
Which Python operator is used to subtract numbers?
x
-
*
/
What is the output of the following python code?
print(‘10’+‘20’)
30
1020
2010
In Python, ................... can’t be used as a variable name.
Keywords
Capital letters
Small letters
What is the output of the following Python code?
x=10
y=50
print(x , y)
60
10 50
50 10
50 50
What is the output of the following python code?
a=1
b=2
print(a+b)
3
123
Error: invalid syntax
The name of the variable may contain (letters, numbers,_).
True
False
Variable names have to start with a capital or lowercase letter or anunderscore (_) .
True
False
Python is a high-level programming language.
True
False
Python is a platform independent programming language that can beused on any operating system.
True
False
Python can be used on a server to create web applications.
True
False
A variable name can be of any length.
True
False
Variable names are case-sensitive (“age” and “Age” are different variable names).
True
False
In Python, 'Hello', is NOT the same as "Hello”.
True
False
Python is Not a popular programming language.
True
False
A variable name can start with a number.
True
False
In python, we can update the variable value.
True
False
String is a number without any decimal.
True
False
A variable name cannot be one of the python keywords.
True
False
Variables can store different data types.
True
False
You can get the data type of an object by using the print() function.
True
False
In Python, strings are enclosed in either single or double quotation marks.
True
False
The script area in Python is where you type the code.
True
False
In Python, print() function is used to accept the value of a variable from the user.
True
False
A variable name can consist of alphabets, digits, and underscore.
True
False
In python, only one type of data can be stored in the memory.
True
False
