wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

python concepts class 11

Total questions: 60

Worksheet time: 32mins

Name
Class
Date
1.

Is Python a high level programming language ?

a)

TRUE

b)

FALSE

2.

Who is the creator of Python programming language ?

a)

Dennis Ritchie

b)

James Gosling

c)

Guido van Rossum

d)

Ross Ihaka

3.

Complete the program to find greater of two numbers ?

a)
b)
c)
d)
4.

Which Program will generate odd numbers ?

a)
b)
c)
d)
5.

What will be the answer of print(5+10) ?

a)

510

b)

15

c)

51

d)

50

6.

What will be the answer of print("50" + "50")

a)

100

b)

5050

c)

505

d)

2500

7.

What is a correct syntax to output "Hello World" in Python?

a)

echo "Hello World"

b)

echo("Hello World")

c)

p("Hello World")

d)

print("hello World")

8.

How to you insert comment in Python ?

a)

Using "#"

b)

Using "//"

c)

Using "--"

d)

Using "\\"

9.

What is the correct file extension for Python files?

a)

.pyth

b)

.pyt

c)

.py

d)

.pt

10.

What is the output of print(100/0 ) ?

a)

100

b)

0

c)

1

d)

Division Error

11.

Which one does take you to next line?

a)

\t

b)

\n

c)

/n

d)

\\

12.

What is the word (command) used to display numbers and text on the screen?

a)

Input

b)

Output

c)

Print

d)

Command

13.

What symbol is used in python to assign values to a variable?

a)

:

b)

*

c)

=

d)

==

14.

Which of these would work as a piece of code?

a)

if string="Dove"

b)

if string=="Dove"

c)

IF string="Dove":

d)

if string=="Dove":

15.

What is the end after if statements?

a)

if

b)

Elif

c)

Else

d)

While

16.

Which of the following is a correctly-formatted comment?

a)

*Comment

b)

"Comment"

c)

#comment

d)

(comment)

17.

A line of text that Python won't try to run as code

a)

Integer

b)

Comment

c)

Strings

d)

Input

18.

A data type than can have one of two values: True or False

a)

Boolean

b)

Basic Calculation

c)

For

d)

While

19.

Data type for a whole number

a)

Float

b)

Boolean

c)

Integer

d)

String

20.

A Python data type that holds positive and negative whole numbers

a)

String

b)

int

c)

str

d)

input

21.

The Boolean operator that returns true if EITHER of its operands are true

a)

and

b)

or

c)

not

d)

equal

22.

// means:

a)

two times division

b)

integer division

c)

exact division with floating number

d)

Put a slash

23.

What does symbol % do?

a)

Integer exact division

b)

Percentage

c)

Division

d)

Remainder

24.

What does "\t " make?

a)

Goes to next line

b)

Horizontal space between two strings

c)

Give a title

d)

Add a slash

25.
How would you assign an integer to a variable?
a)
new_var = 4
b)
new_var == 4
c)
new_var = "4"
d)
new var "4"
26.
How would would you print a text string?
a)
output "Hello!"
b)
print ("Hello!")
c)
print (Hello!)
d)
output (Hello!)
27.
To create a variable named new_var and assign it a value of 81 divided by 9, which statement would you use?
a)
new_var = 81 \ 9
b)
new_var = "81 / 9"
c)
new_var = "81 \ 9"
d)
new_var = 81 / 9
28.
Choose the statement that assigns 4 to the power of 3 to the variable new_var...
a)
new_var = 4 ** 3
b)
new_var = 3 ** 4
c)
new var = 3 ** 4
d)
new_var = 4 ^^ 3
29.
Which of the following is a float?
a)
new_var = 1234
b)
new_var = True
c)
new_var = 1.234
d)
new_var = "True"
30.
Which of the following is a float?
a)
new_var = 1234
b)
new_var = True
c)
new_var = 1.234
d)
new_var = "True"
31.
Which of the following is not a string?
a)
new_var = "True"
b)
new_var = "3123"
c)
new_var = "3.123"
d)
new_var = False
32.
How would you output new_var = 123 as a text string?
a)
print str(new_var)
b)
print new_var.str
c)
print str[new_var]
d)
print (new_var).str()
33.
Numbers with a decimal point belong to a type called...
a)
pointing
b)
integers
c)
decimal
d)
float
34.
To create a newline at the end of a prompt, you can use which of the following expressions?
a)
\new
b)
\return
c)
\break
d)
\n
35.
A _____________ expression is an expression that is either true or false. 
a)
boolean
b)
truth
c)
variable
d)
conditional
36.
What does an IF statement do?
a)
Closes the program
b)
Makes a decision
c)
Asks a question
37.

What is the answer to this expression, 22%3 is

a)

7

b)

1

c)

0

d)

5

38.

Which is the correct operator for power  xyx^y  

a)

x^y

b)

x**y

c)

x^^y

d)

None of these

39.

Which one of theses is floor division

a)

/

b)

//

c)

%

d)

None of theses

40.

What is the order of precedence in Python?

i. Parenthesis

ii. Exponential

iii. Multiplication

iv. Division

v. Addition

vi. Subtraction

a)

i, ii, iii, iv, v, vi

b)

ii, i, iii, iv, v, vi

c)

ii, i, iv, iii, v, vi

d)

i, ii, iii, vi, v, iv

41.

Mathematical operations can be performed on a string

a)

True

b)

False

42.

Operators with same precedence are evaluated in which manner?

a)

Left to Right

b)

Right to Left

c)

Can't Say

d)

None of the mentioned

43.

What is the output of this expression, 3*1**3

a)

27

b)

9

c)

3

d)

1

44.

Which of the following is an invalid variable?

a)

my_string_1

b)

1st_string

c)

foo

d)

-

45.

is Python case sensitive when dealing with identifiers?

a)

yes

b)

no

c)

machine dependent

d)

none of these

46.
What will the output be from the following code?
print(3+4)
a)
3+4
b)
7
c)
SyntaxError
d)
print(3+4)
47.
What will the output be from the following code?
print("3+4")
a)
7
b)
3+4
c)
34
d)
SyntaxError
48.
The second part of if, that is executed when the condition is false
a)
if
b)
else
c)
for
d)
input
49.
Converts a number to a string
a)
str()
b)
int()
c)
parseInt()
d)
convert
50.
What does the term 'debug' mean?
a)
Identify errors and fix them.
b)
Making a calculation
c)
A set of instructions
d)
Looking at code
51.

It is possible to execute both the (block of) statements under if and the else clauses at the same time.

a)

Yes

b)

No

52.

What would be outputted here?

a)

Bigger than 2!

b)

Number is 5

c)

Bigger than 2!

Number is 5

d)

Nothing

53.

This operator checks to see if one value is the same as the other value

a)

==

b)

!=

c)

>

d)

<

54.

What is the output of the following code?


Time = "Day"

Sleepy = False

Pajamas = "Off"

if Time == "Night" and Sleepy == True:

Pajamas = "On"

print(Pajamas)

a)

off

b)

on

c)

False

d)

Day

55.

What will the be the output of the following code?


if (10<0) and (0 <-10):

print(“A”)

else:

print(“B”)

a)

A

b)

B

c)

AB

d)

BA

56.

Is the following statement true or false?


More than one condition cannot be used with an IF statement.

a)

True

b)

False

57.

The result of this program:

Friday = False

if Friday:

print "Jeans day!"

else:

print "Uniform day"

a)

Jeans day

b)

Today is Friday

c)

Uniform day

d)

Not Friday

58.
This operator means that one value is not equal to another value
a)
==
b)
<=
c)
>=
d)
!=
59.

What is the output?

a)

condition

b)

True

c)

Program has a syntax error.

d)

3 > 2

60.

What do we use to define a block of code in Python language?

a)

Key

b)

Brackets

c)

Indentation

d)

None of these