wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Intro to Python BBG

Total questions: 25

Worksheet time: 13mins

Name
Class
Date
1.

What is a variable?

a)

A math operator

b)

An element, feature, or factor that is liable to vary or change.

c)

An if statement

d)

A computer system that can change

2.

What does print("hello) display?

a)

hello

b)

gives you an error

c)

"hello"

d)

"hello

3.

What does the following code display?


a = 1

b = 2

print(a + a)

a)

2

b)

3

c)

4

d)

22

4.

'my name' is a valid variable?

a)

No

b)

Yes

5.

How do you ask an input from a user?

a)

name = int("what is your name")

b)

name = input(what is your name?)

c)

input = name("what is your name?")

d)

name = input("what is your name?")

6.

What is a variable?

a)

A math operator

b)

An element, feature, or factor that is liable to vary or change.

c)

An if statement

d)

A computer system that can change

7.

What does print("hello) display?

a)

hello

b)

gives you an error

c)

"hello"

d)

"hello

8.

Finding and fixing the errors in a program

a)

Indentation

b)

Nesting

c)

Event Block

d)

Debugging

9.

A block of code that may repeat or run more than once.

a)

Loop

b)

If

c)

Function

d)

Event Block

10.

____________ is information the user sends to the computer

a)

Software

b)

Input

c)

Secondary Memory

d)

Program

11.

How will the following code look on the screen?

print ("I love programming.")

print ("I love programming.")

a)

"I love programming."

"I love programming."

b)

I love programming.

I love programming.

c)

I love programming. I love programming.

d)

I LOVE PROGRAMMING

I LOVE PROGRAMMING

12.
What is the word (command) used to display numbers and text on the screen?
a)
print
b)
input
c)
output
d)
command
13.
What symbol is used in python to assign values to a variable?
a)
equals =
b)
plus + 
c)
forward slash /
d)
asterisk *
14.

What will be the output?

name = "Dave"

print (name)

a)

Dave

b)

'Dave'

c)

name

d)

(name)

15.
A syntax error means your code has a 'grammar' mistake or you used symbols/operations incorrectly
a)
True
b)
False
16.
What Python command lets the user enter an answer to a question?
a)
answer()
b)
open()
c)
print()
d)
input()
17.
Which statement correctly assigns the string "Tanner" to the variable name?
a)
name  = print( "Tanner")
b)
input("Tanner")
c)
name = "Tanner"
d)
name = input("Tanner")
18.

Python is used for:

a)

Server Side Web Development

b)

Software Development

c)

Mathematics

d)

All of the above

19.

What data type is used to store a list of characters?

a)

real

b)

string

c)

integer

d)

boolean

20.

What does IDE stand for?

a)

Integrated Development Environment

b)

Internet Development Editor

c)

Internet Development Environment

d)

Icelandic Development Editor

21.

What does an if statement do?

a)

Close the program

b)

Ask a question

c)

Make a decision

d)

Write a comment

22.

A series of letters, numbers, or symbols in quotation marks is:

a)

Input

b)

Output

c)

String

d)

Comment

e)

Error

23.

What is a number that has a decimal point?

a)

Assignment

b)

Concatenation

c)

Value

d)

Float

e)

Integer

24.

What is a whole number?

a)

Assignment

b)

Concatenation

c)

Value

d)

Float

e)

Integer

25.

what is the output of the below code snippet?

num1=10

num2=7//2

num2*=num1

print(num2)

a)

10

b)

35.0

c)

30

d)

30.0