wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Term3 - Gerade 5 - Revision

Total questions: 42

Worksheet time: 21mins

Name
Class
Date
1.

What Python syntax should I use to output "Hello World"?

a)

print("Hello World”)

b)

p("Hello World")

c)

echo "Hello World"

2.

Which function in Python is used to display the output?

a)

type()

b)

print()

c)

output()

3.

In Python, how do you create a numeric variable with the value 6 ?

a)

X=6

b)

X=”6“

c)

X=x6

4.

In Python, which operator is used to multiply numbers?

a)

x

b)

%

c)

*

5.

Python variables could be .....................

a)

containers for storing data values.

b)

a number, positive or negative, with one or more decimals.

c)

a whole number, positive or negative, without decimals, of unlimited length .

6.

Which Python operator is used to divide numbers?

a)

x

b)

%

c)

/

7.

Any object's data type can be determined by which function?

a)

type()

b)

print()

c)

output()

8.

What is the missing part of the code below to output Hello, World! ?

a)

output

b)

show

c)

print

9.

.................... is a whole number, positive or negative, without decimal point

a)

Integer

b)

String

c)

Float

10.

What is the output of the following python code?

A=10

B=20

C=A+B

print(“The sum is: ”,C)

a)

The sum is: 30

b)

30

c)

The sum is: A+B

11.

Which of the following is an example of a variable name in python?

a)

Car name

b)

Car.name

c)

Car_name

12.

Which of the following is an example of invalid variable names in python?

a)

Employee code

b)

10 code

c)

A.B.C. code

d)

all of the them

e)

none of the them

13.

Which data type represents floating point values?

a)

Integer

b)

String

c)

Float

14.

Which of the following data types is not a datatype in Python

a)

Number

b)

String

c)

Float

15.

The data type for 12.4 should be................

a)

Number

b)

String

c)

Float

16.

The data type for -100 should be................

a)

Integer

b)

String

c)

Float

17.

......................... is the area where you type the code.

a)

Work area

b)

Worksheet

c)

Script area

18.

Which Python operator is used to subtract numbers?

a)

x

b)

-

c)

*

d)

/

19.

What is the output of the following python code?

print(‘10’+‘20’)

a)

30

b)

1020

c)

2010

20.

In Python, ................... can’t be used as a variable name.

a)

Keywords

b)

Capital letters

c)

Small letters

21.

What is the output of the following Python code?

x=10

y=50

print(x , y)

a)

60

b)

10 50

c)

50 10

d)

50 50

22.

What is the output of the following python code?

a=1

b=2

print(a+b)

a)

3

b)

123

c)

Error: invalid syntax

23.

The name of the variable may contain (letters, numbers,_).

a)

True

b)

False

24.

Variable names have to start with a capital or lowercase letter or anunderscore (_) .

a)

True

b)

False

25.

Python is a high-level programming language.

a)

True

b)

False

26.

Python is a platform independent programming language that can beused on any operating system.

a)

True

b)

False

27.

Python can be used on a server to create web applications.

a)

True

b)

False

28.

A variable name can be of any length.

a)

True

b)

False

29.

Variable names are case-sensitive (“age” and “Age” are different variable names).

a)

True

b)

False

30.

In Python, 'Hello', is NOT the same as "Hello”.

a)

True

b)

False

31.

Python is Not a popular programming language.

a)

True

b)

False

32.

A variable name can start with a number.

a)

True

b)

False

33.

In python, we can update the variable value.

a)

True

b)

False

34.

String is a number without any decimal.

a)

True

b)

False

35.

A variable name cannot be one of the python keywords.

a)

True

b)

False

36.

Variables can store different data types.

a)

True

b)

False

37.

You can get the data type of an object by using the print() function.

a)

True

b)

False

38.

In Python, strings are enclosed in either single or double quotation marks.

a)

True

b)

False

39.

The script area in Python is where you type the code.

a)

True

b)

False

40.

In Python, print() function is used to accept the value of a variable from the user.

a)

True

b)

False

41.

A variable name can consist of alphabets, digits, and underscore.

a)

True

b)

False

42.

In python, only one type of data can be stored in the memory.

a)

True

b)

False