Human languages are
ambiguous
Computer languages
must be precise
Complex Conditionals
CSD Code Studio Level 9
Complete this conditional statement:
IF it snows and the temperature is below 32
_________________
ELSE
_________________
Review
Boolean: true or false
Expression: something you evaluate to get an answer like 1+5 or x < 7
Conditional or Boolean expression:
an expression with a Boolean result
Conditional statement:
chooses what to do based on a conditional expression
These are conditional statements
conditional
Complex
conditional
Write your own conditional statements
in code form using Boolean expressions:
1. If the bell rings you should log out.
2. You can buy french fries if you have at least 50 cents.
3. If the bird sprite is on the top half of the screen, rotate it by 10.
Conditional statements
in code form using Boolean expressions:
1. If the bell rings you should log out.
2. You can buy french fries if you have at least 50 cents.
3. If the bird sprite is on the top half of the screen, rotate it by 10.
These are more Boolean functions in CodeLab
mouseDidMove()
mouseWentDown(side)
mouseWentUp(side)
keyWentDown(key)
keyWentUp(key)
Returns true if the mouse
did move
Returns true once when
the specified mouse
button is pressed down
Returns true once when
the specified mouse
button is released
Returns true once when
the specified key is
pressed down
Returns true once when
the specified key is
released
if(mouseDidMove())
{}
if(mouseWentDown("left"))
{}
if(mouseWentUp("left"))
{}
if(keyWentDown("e"))
{}
if(keyWentDown("m"))
{}
Video (4:18)
What happens?
What happens?
Work in code studio Stage 9
Human languages are
ambiguous
Computer languages
must be precise
© Copyright 2026 Paperzz