NEW
Font size
WorksheetsJH U1/L4- Kira Conditional Statements
Total questions: 7
Worksheet time: 4mins
Which statement is added when there are two possible outcomes that need handling in addition to an if statement?
while
else
return
import
For the line of code that begins an else block in Platypus, what must be included at the end of that line?
Semicolon
Colon
Closing brace
Quotation mark
How do computer programs treat any line of code that starts with a hashtag symbol (#)?
They execute it first
They ignore it
They convert it to a string
They store it in a log
In the Platypus language, what must appear at the end of an if statement to avoid a syntax error?
A semicolon
An indentation
A colon
A closing parenthesis
According to the Platypus rules, what must happen to the line(s) of code inside an if statement?
They must be commented out
They must be indented
They must be placed in parentheses
They must be preceded by a colon
When there are two possible outcomes to handle in Platypus, which additional construct can be used with an if statement?
switch
while
else
function
How do computer programs treat any line of code that starts with a hashtag symbol (#)?
They execute it before other lines
They store it in memory
They ignore it
They convert it to a string
