wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

PYTHON BASICS PART 1

Total questions: 10

Worksheet time: 5mins

Name
Class
Date
1.

What language are we learning?

a)

Java

b)

Python

c)

Basics

d)

Pascal

2.

What is the built-in function to display numbers and/or texts on the screen?

a)

print

b)

printf

c)

display

d)

show

3.

Is Python case-sensitive when dealing with identifiers?

a)

machine-dependent

b)

yes

c)

no

d)

none of these

4.

What is the purpose of input statement?

a)

Plug in something

b)

Display data

c)

Ask user to find correct data

d)

Ask user to enter some data

5.

Which of the following name is a valid identifier?

a)

my name

b)

percent%

c)

num2

d)

3interest

6.

What will be printed out by the following statements?

a = 35

print("The value in a is ",a)

a)

The value in a is 35

b)

the value in a is35

c)

a = 35

d)

no correct answer

7.

Which statement is NOT a valid output statement?

a)

print ("number")

b)

print(""number"")

c)

print(number)

d)

print('number')

8.

Which statement is a VALID input statement?

a)

input("Enter a number")

b)

a = ("Enter a number")

c)

a = input("Enter a number")

d)

a=input(Enter a number)

9.

How to display the value inside variable total with the comment string Total = ?

a)

print ("Total = ", total)

b)

printf ("Total = ", total)

c)

print("Total = total")

d)

print ("Total = " total)

10.

If you would like to ask the user to input his/her name, what is the correct input statement?

a)

input("Enter your name: ")

b)

name = ("Enter your name: ")

c)

name = input ("Enter your name: ")

d)

name = input (Enter your name: )