Zmiany

Skocz do: nawigacji, wyszukiwania

Introduction 3 - Glossary of basic Scratch 2.0 blocks

Dodane 1884 bajty, 08:12, 7 lip 2015
/* Sensing */
[[Plik:M_3_103.JPG]]
 
 
==Operators==
 
[[Plik:M_3_104.JPG|center]]
 
The category of '''Operators''' groups blocks of basic arithmetic operations, logical operations and various functions (both arithmetic and on texts). All blocks in this category are used as arguments for other blocks. Below is a description of most blocks in this category.
 
[[Plik:M_3_105.JPG]]
 
Blocks of the four basic arithmetic operations (addition, subtraction, multiplication, division). In the edit boxes arguments should be provided (which may be manually entered numbers, the value of a variable or the result of another action, so blocks can be embedded). A built arithmetic expression should be used as an argument for another block, e.g. to determine the value of a variable or a logical expression.
 
'''Example:'''
 
[[Plik:M_3_106.JPG]]
 
Draws a number from a specified range. In the edit box we should specify the lower and upper range of the random number to be picked. The block should be used as an argument for another block.
 
'''Example:'''
 
[[Plik:M_3_107.JPG]]
 
[[Plik:M_3_108.JPG]]
 
Comparison blocks (less than, equal to, greater than). In the edit boxes we should specify values to be compared. We can enter specific values in the edit fields, most often one of the arguments is the value of a variable or a value read with the use of another block (e.g. a coordinate of a sprite’s position on the stage). This block is used most often in the following instructions: '''if, repeat until, wait until'''.
 
'''Example:'''
 
[[Plik:M_3_109.JPG]]
 
The blocks used to build complex logical expressions (conjunction – both conditions are true, alternative – one of the conditions is true, negation – contradiction). Insert the matching blocks returning Boolean values (true or false) in argument boxes. Blocks are used most often in the following instructions: if, repeat until, wait until.
'''Example:'''
223
edycje