Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Python Test

Total questions: 65

Worksheet time: 34mins

Name
Class
Date
1.

How well are you "getting" the Python language so far?

a)

I don't understand most of the words

b)

I sort of understand the words, but I don't understand what it looks like in actual code

c)

I'm pretty at the vocab and the TechSmart program. I have some work to do, but I'm getting it.

d)

I get it all like a boss. You're moving too slowly for me, old man.

2.

What is a computer?

a)

All the hardware and software that work together to make a computer run

b)

Scientists using computers to develop things that make lives easier

c)

A device that stores and processes information

d)

Changing, moving, or rewriting information

3.

What is computer science?

a)

All the hardware and software that work together to make a computer run

b)

Python

c)

A device that stores and processes information

d)

The study of computers and how they can be used to solve problems

4.

What is a computing system?

a)

All the hardware and software that work together to make a computer run

b)

Python

c)

A device that stores and processes information

d)

The study of computers and how they can be used to solve problems

5.

Which of these IS computer science? (Hint: There are three)

a)

Creating an app that allows friends to share funny cat videos

b)

Commenting on friends' vacation photos

c)

Reading a comic book on your iPad

d)

Writing a program that checks your math homework for correct answers

e)

Programming a video game

6.

Which of these IS NOT computer science? (Hint: There are three)

a)

Creating an app that allows friends to share funny cat videos

b)

Commenting on friends' vacation photos

c)

Reading a comic book on your iPad

d)

Watching videos of cats riding tricycles

e)

Programming a video game

7.

What is a programming language

a)

The result of your code, what is seen when it runs

b)

Python is a widely used language for designing websites, analyzing data, etc.

c)

Words, numbers, symbols and formatting used to tell computers what to do

d)

Built-in tools, such a print

8.

In python, what is output?

a)

Built-in tools, such as print

b)

Text in parentheses

c)

The name of a variable

d)

The result of the code, what is seen when it runs

9.

In python, what is a function?

a)

Built-in tools, such as print

b)

Text in parentheses

c)

The name of a variable

d)

The result of the code, what is seen when it runs

10.

In python, what is a parameter value?

a)

Built-in tools, such as print

b)

Text in parentheses

c)

The name of a variable

d)

The result of the code, what is seen when it runs

11.

In python, what is a variable?

a)

Built-in tools, such as print

b)

Text in parentheses

c)

The name of a variable

d)

The result of the code, what is seen when it runs

12.

Which of these is NOT a type of data that can be a variable?

a)

Comments

b)

Integers

c)

Strings

d)

Boolean values

13.

A print statement is:

a)

Input

b)

Output

c)

String

d)

Comment

e)

Error

14.

Info a program receives from a user is:

a)

Input

b)

Output

c)

String

d)

Comment

e)

Error

15.

A line of code ignored by the computer is:

a)

Input

b)

Output

c)

String

d)

Comment

e)

Error

16.

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

a)

Input

b)

Output

c)

String

d)

Comment

e)

Error

17.

What is it called when you join two strings together with the + symbol?

a)

Assignment

b)

Concatenation

c)

Value

d)

Float

e)

Integer

18.

What is a number that has a decimal point?

a)

Assignment

b)

Concatenation

c)

Value

d)

Float

e)

Integer

19.

What is a whole number?

a)

Assignment

b)

Concatenation

c)

Value

d)

Float

e)

Integer

20.

What is the process for storing a variable? (x = y, for example?)

a)

Assignment

b)

Concatenation

c)

Value

d)

Float

e)

Integer

21.
What is the word (command) used to display numbers and text on the screen?
a)
print
b)
input
c)
output
d)
command
22.
What is a variable?
a)
A box(memory location) where you store values
b)
a type of graphics
c)
Data type
d)
a type of memory
23.
What symbol is used in python to assign values to a variable?
a)
equals =
b)
plus + 
c)
forward slash /
d)
asterisk *
24.
What is the name of the programming language we are learning?
a)
Scratch
b)
Python
c)
Pie thin
d)
Scribble
25.

What will be the output?

name = "Dave"

print (name)

a)

Dave

b)

'Dave'

c)

name

d)

(name)

26.
When you have an error in your code what is the term to summarise finding and fixing that error?
a)
Error checking
b)
Debugging
c)
Syntax finder
d)
Error finder
27.
A syntax error means your code has a 'grammar' mistake or you used symbols/operations incorrectly
a)
True
b)
False
28.
What is Python?
a)
text based programming language
b)
word processor 
c)
spreadsheet
d)
block based programming language
29.
What Python command lets the user enter an answer to a question?
a)
answer()
b)
open()
c)
print()
d)
input()
30.
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")
31.

Why was Python (TM) developed?

a)

To go back to the old way of programming

b)

To create a programming language for students in grade school

c)

To make it easier to learn Java

d)

Python was developed by accident

32.

Python (TM) is owned and managed by

a)

Microsoft (c)

b)

Sun Microsystems (c)

c)

Python (TM) is open source and free to use

d)

Google (c)

33.

Python is ___________ level programming language and is ___________.

a)

High, compiled

b)

High, interpreted

c)

Low, compiled

d)

Low, interpreted

34.

Generally speaking, a low level programming language is easier to read, write and maintain over a high level programming language

a)

True

b)

False

35.

The syntax in Python (TM) is one of the main advantages over other high level programming languages.

a)

True

b)

False

36.

A statement in programming

a)

Expresses an action to be carried out

b)

Always returns results like expressions

c)

Rules controlling how components in a program are combined

d)

An instruction to perform a task, usually one word

37.

A string

a)

carries out an action

b)

the elements of a command

c)

a collection of characters

d)

how elements in a commad are arranged

38.

A block is

a)

a statement including elements of a command

b)

the structure and form of the code

c)

source code that is grouped together

d)

meaning assigned to symbols, characters and words

39.

What symbol comes before a comment?

a)

$

b)

>>

c)

#

d)

!

40.

An exception is

a)

the structure of form of the code

b)

the meaning of the characters and words in the code

c)

the statement that is missing from the instructions

d)

an event occurring during execution of a program which disrupts the flow of the program's instructions

41.

Debugging is

a)

how characters are arranged in a statement

b)

detecting or removing errors from a program

c)

removing viruses from a computer

d)

the meaning of each of the characters and symbols in the program

42.

A disadvantage of Python is it is harder to debug than other higher level programming languages.

a)

True

b)

False

43.

In programming, a (n) _______________ is a value that can change, depending on conditions or on information passed to the program

a)

string

b)

block

c)

instruction

d)

variable

44.

Generally speaking Python (TM) would run _____________ than C++ and take ____________ time to create

a)

faster, less

b)

faster, more

c)

slower, less

d)

slower, more

45.

Since Python (TM) is open source,

a)

Support for using Python (TM) is easy to find

b)

It is free

c)

There is a large catalog of supporting documents

d)

it is a less powerful programming languange

46.

What is the title of the documentary?

(a)  

47.

The documentary focuses on what race (a)   ​ of Americans.

Choose from the below words
african american
asian
caucasian
hispanic
48.

What does NASA stand for?

a)

National Aeronautic and Space Administration

b)

National Airplane and Space Administration

c)

National Aeronautic and Space Agency

1)
2)
3)
49.

Who was Charlie Bolden?

a)

Former NASA Administrator and Astronaut

b)

Delta Pilot

c)

News Reporter

50.

Charlie Bolden was the first ​ (a)   NASA Administrator under the ​ (b)   Presidency

Choose from the below words
Black
Obama
White
Kennedy
Hispanic
Trump
51.

(a)   was the first African American offered to become a NASA astronaut by President Kennedy.

52.

African Americans became engineers by going to what schools?

a)

Military

b)

Public

c)

Private

d)

HBCU

53.

A while loop can be used in which of the following situations?

a)

Repeat a set of statements till a condition remains True.

b)

Repeat a set of statements a finite or an infinite number of times.

c)

Iterate through a string, list, and tuple.

d)

All of the above

54.

What is a variable?

a)

a type of graphics

b)

A box(memory location) where you store values

c)

Data type

d)

a type of memory

55.

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

a)

equals =

b)

plus +

c)

minus -

d)

asterisk *

56.

What will be the output?

name = "Dave"

print (name)

a)

(name)

b)

Dave

c)

name

d)

Nothing

57.

A syntax error means your code has a 'grammar' mistake or you used symbols/operations incorrectly

a)

True

b)

False

58.

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")

59.

What is the output from the following code?

print ("hello world")

a)

hello world

b)

print

c)

nothing

d)

"HELLO WORLD"

60.

What will be the output?

name = "Dave"

print ("name")

a)

Dave

b)

name

c)

"name"

d)

"Dave"

61.

Kind of loop used when you know the number of times you want it to repeat

a)

list

b)

for

c)

while

d)

if

62.

Loop that runs till the condition is true

a)

list

b)

while

c)

for

d)

if

63.

In Python, the two types of loops are _____ and _______

a)

while

b)

for

c)

list

d)

if

64.

Choose the correct output of the following code.

for i in range(10,15):       

print(i)

a)

10

11

12

13

14

15

b)

10

11

12

13

14

c)

11

12

13

14

15

d)

11

12

13

14

65.

What symbol do you use to make a comment in Python?

a)

+

b)

//

c)

$

d)

#