wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

NAT4 SDD

Total questions: 15

Worksheet time: 8mins

Name
Class
Date
1.

What is involved in text-based coding?

a)

Typing commands into code file

b)

Dragging the blocks of code in visual graphic-based coding environment

2.

If you misspell a word in code or leave out a punctuation symbol accidentally, what kind of error is this?

a)

syntax

b)

logic

c)

runtime

d)

spelling

3.

What is the function of print() in Python program?

a)

Output

b)

Input

c)

Process

d)

Save

4.

Functions will always have a brackets at the end of the function name.

a)

TRUE

b)

FALSE

5.

If you want to output the exact text you typed into the source code, you need to include it within?

a)

square brackets

b)

quotation marks

c)

semi-colon

d)

comma

6.

What is the function of input() in Python?

a)

input

b)

output

c)

process

d)

save

7.

The text included within brackets after input word, is there to be displayed to the user and asks for information to be typed in for example input("Please enter your name")


This text is called parameter.

a)

TRUE

b)

FALSE

8.

Setting up a variable in main memory for use within a program is called:

a)

declaring

b)

initialising

c)

executing

d)

naming

9.

Leaving notes about the program within the code so that it can be understood more easily if read later or by someone else is called?

a)

internal commentary

b)

executing code

c)

appropriate indentation

d)

white space balance

10.

What character do you use to out comment part of code in Python?

a)

#

b)

<!----->

c)

//

d)

/**

11.

Indentation is white space put in by using the space bar or tab key. It is used to show where loops and conditional statements begin and end.

a)

TRUE

b)

FALSE

12.

When writting if statement: why would you use "elif" within Python code?

a)

If there are more than two outcomes

b)

If there are two outcomes only: TRUE and FALSE

c)

To highlight that this is beginning of if statement

d)

To give user choice which part of code to run

13.

What two values BOOLEAN variable holds?

a)

TRUE

b)

FALSE

c)

YES

d)

NO

14.

Select correct numbers:


10<=

a)

10,11,12,13,14 ...

b)

10,9,8,7,6 ...

15.

Select correct numbers:


15< AND 20=>

a)

16,17,18,19,20

b)

16,17,18,19

c)

... 10,11,12,13,14 .. 20,21,22,23 ...

d)

19,18,17,16