Page 70 - Computer Class 04
P. 70
For example : PRINT “Hello press Enter key or click on Execute command.
This command prints the word Hello. To print a word, use an opening
quotation mark (‘‘) before the word.
Another example is :
PRINT [COMPUTER IS MY WORLD] press Enter key or click on Execute
command.
This command prints the sentence COMPUTER IS MY WORLD. To print a
sentence, enclose it within the square brackets ([ ]).
Arithmetic Operations
LOGO supports basic arithmetic operations like addition, subtraction,
multiplication and division. The various symbols, like +, –, *, / used to
perform these operations are called operators .
Mathematical Functions in LOGO
We can perform some mathematical functions like SUM, DIFFERENCE,
PRODUCT, REMAINDER and QUOTIENT in LOGO.
Let us learn about it.
SUM Function
This function is used to add two or more numbers.
Command : PRINT SUM <space> number 1 <space> number 2 press
Enter key or click on Execute command.
For example : PRINT SUM 10 20
PRINT SUM 10 20
30
PRINT (SUM 10 20 30)
60
Computer-4 70 Computer-1