stud
bud
Sign up
Log in
Home
Library
Explore
SAT
More
2nd Partial Review Micro:bit Flashcards | StudBud
Explore
/
2nd Partial Review Micro:bit
2nd Partial Review Micro:bit
16 terms
·
StudBud Administration
·
128 plays
Programming concepts using Makecode. Conditionals and Loops
Flashcards
16 cards
F
Practice quiz
P
Host live
L
Questions
16
Answers
1
What is the x and y coordinate location of the LED sprite?
x:4, y:2
x:4, y:4
x:2, y:2
x:3, y:3
2
The following are examples of arithmetic operators in programming language:
÷ × ≥ π
+, -, /, *, %
#, ?, !, *, $
3
Which loop in MakeCode, just runs a command n times?
Repeat
While
For
If
4
Example(s) of a simple condition:
If grade >70 or average > 90 then, display “candidate for scholarship
If grade >70 and average > 90 then, display “candidate for scholarship”
If grade > 70 then, display “Passed”
If grade > 70 then, display “Passed” else, “Not Passed”
5
What happens in the next code:
Nothing is shown in the screen.
Diplay numbers 1 to 4, returns cuenta to 1 and repeats forever.
Display numbers 1 to 5, returns cuenta to 1 and repeats forever.
6
A conditional statement MUST have all the following: If, then, else
False
True
7
Which loop in MakeCode, runs a command n times with a variable to increment each time?
Repeat
While
If
For
8
What is it called when a loop block is inside another loop block?
Nested Loops
Controlled Loops
Compound Loops
Infinite Loops
9
The following are examples of logical/boolean operators:
||, &&, ¿
||, &&, !
and, or, neither
and, or, not
10
The following are examples of relational operators:
+, -, /, *, %
and, or, not
==, !=, >, <, >=, <=
11
What happens in the next code:
Display numbers from 1 to 5, returns cuenta to 1 and repeats forever
Display numbers from 1 to 5 , one time and it ends.
Display numbers from 1 to 4, returns cuenta to 1 and repeats forever
12
In coding, conditionals tell a computer which of the following?
To do it faster
How to do it
Where to do it
When to do it
13
What is the x and y coordinate location of the LED sprite?
none of the above
x:5, y:2
x:3, y:4
x:4, y:1
14
Which loop in MakeCode, runs a command as long as certain condition is met?
While
Repeat
For
If
15
Example(s) of compound conditions:
If grade > 70 then, display “Passed”
If grade > 70 then, display “Passed” else, “Not Passed”
If grade >70 or average >90 then display “candidate for scholarship”
If grade >70 and average > 90 then, display “candidate for scholarship
16
What happens in the next code:
Show numbers from 1 to 10 in the screen.
Show number 1 in the screen.
Show numbers from 1 to 9 in the screen.