wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

RWMS Coding Basics Semester Exam Review

Total questions: 20

Worksheet time: 11mins

Name
Class
Date
1.

Enter the correct PYTHON command code to display Hello World in the console.

(a)  

2.

What is the purpose of leaving comments in ANY code we create?

a)

To provide human readable notes for clarification

b)

To run the code

c)

They allow words to be printed on the screen

d)

They allow the program to run functions and conditionals

3.

What will happen when the following code is run?

a)

Nothing happens

b)

The words Welcome to my underground lair print on the screen

c)

The site window's tab becomes titled Welcome to my underground lair

d)

The word body prints on the screen

4.

How do you insert COMMENTS in PYTHON code?

a)

//This is a Python comment

b)

/*This is a Python comment*/

c)

#This is a Python comment

d)

<! --This is a Python comment-->

5.

What is the name of the style customarily used for variables in most coding languages?

a)

sunglassesCase

b)

cobraKaiCase

c)

briefCase

d)

camelCase

6.

What type of information is an int?

a)

question

b)

whole numbers

c)

number with decimals

d)

words

7.

What will be printed on the screen from the following PYTHON code?

print(14+7)

a)

14,7

b)

21

c)

14+7

d)

Nothing prints

8.

What is this creating in PYTHON?

def right_Ans();

a)

a loop

b)

a function

c)

a variable

d)

a conditional

9.

What is the correct name for a word, words or phrase used in most code?

a)

syntax

b)

comment

c)

string

d)

integer

10.

One of, if not THE, MOST important aspect of any code is...

a)

writing long code

b)

indentation

c)

using camelcase

d)

syntax

11.

Which symbol is used for division in most coding languages?

a)

%

b)

/

c)

*

d)

#

12.

Which parts of your written code make most of the decisions?

a)

conditionals

b)

loops

c)

functions

d)

the user

13.

What symbols MUST be present at the beginning and ending of the main body of PYTHON code?

a)

( )

b)

{ }

c)

/ /

d)

[ ]

14.

Which is the proper way to write a conditional in PYTHON?

a)

IF (x == y):

b)

IF (x = y):

c)

WHEN (x <= y):

d)

IF (x == y) THEN;

15.

Functions are placeholders or containers to store information used in a program.

a)

True.

b)

False.

16.

Variables are ''mini-programs" used in a program, front-loaded, that can be called up at any time to perform a task.

a)

True.

b)

False.

17.

What symbol must be used to insert a COMMENT in html?

a)

<! –– HTML comment ––>

b)

#HTML comment#

c)

//HTML comment//

d)

<com> HTML comment </com>

18.

What would this code output on the screen in HTML?

a)

I Love Sports!

b)

"I Love Sports!"

c)

(nothing)

d)

I REALLY Love Sports!

19.

What does this do in your paragraph? <br>

a)

Breaks the line and moves the text to the next line

b)

Lets you brag about your kickin' programing skills

c)

Lets the user know that you're cold

d)

Tells the user to take a break from using the internet because they've been on it for hours

20.

Which of the following is/are valid types of variables in PYTHON? (check all that apply)

a)

int

b)

float

c)

string

d)

double

e)

boolean