Scratch: Comparing Numbers
Loading...
S Scratch Lab Lesson 1 · conditions
In-browser practice

BUILD THE ALGORITHM

Who is bigger?

Enter two numbers and click the green flag. Three conditions will show the result.

01 lesson

Test your program

Numbers will go into variables a and b.

0 runs
aFirst number vs bSecond number ● Run Reset

STAGE

What the sprite does

готов к запуску
Нажми зелёный флаг и сравни два числа

SCRIPT

Block-based Program

3 independent conditions
when green flag clicked●
ask "Enter the first number" and wait
setavalueответ
ask "Enter the second number" and wait
setbvalueответ
repeat3times

Checks inside a loop are executed over and over again.

ifa>bthen
say "The first number is greater"2 sec.
ifa<bthen
say "The second number is greater"2 sec.
ifa=bthen
say "Numbers are equal"2 sec.
Build · Run · UnderstandScratch logic without fear