Font size
WorksheetsNAT4 SDD
Total questions: 15
Worksheet time: 8mins
What is involved in text-based coding?
Typing commands into code file
Dragging the blocks of code in visual graphic-based coding environment
If you misspell a word in code or leave out a punctuation symbol accidentally, what kind of error is this?
syntax
logic
runtime
spelling
What is the function of print() in Python program?
Output
Input
Process
Save
Functions will always have a brackets at the end of the function name.
TRUE
FALSE
If you want to output the exact text you typed into the source code, you need to include it within?
square brackets
quotation marks
semi-colon
comma
What is the function of input() in Python?
input
output
process
save
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.
TRUE
FALSE
Setting up a variable in main memory for use within a program is called:
declaring
initialising
executing
naming
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?
internal commentary
executing code
appropriate indentation
white space balance
What character do you use to out comment part of code in Python?
#
<!----->
//
/**
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.
TRUE
FALSE
When writting if statement: why would you use "elif" within Python code?
If there are more than two outcomes
If there are two outcomes only: TRUE and FALSE
To highlight that this is beginning of if statement
To give user choice which part of code to run
What two values BOOLEAN variable holds?
TRUE
FALSE
YES
NO
Select correct numbers:
10<=
10,11,12,13,14 ...
10,9,8,7,6 ...
Select correct numbers:
15< AND 20=>
16,17,18,19,20
16,17,18,19
... 10,11,12,13,14 .. 20,21,22,23 ...
19,18,17,16
