Page 14 - Touchcode_C7_Flipbook
P. 14

Operation         Symbol                    Description                         Example

                   Addition                  +      Adds one operand to the other                 a+b=40

                   Subtraction               -      Subtracts second operand from the first a-b=20

                   Multiplication            *      Multiplies one operand by the other           a*b=300

                   Division                  /      Divides first operand by the second           b/a=3
                   Modulus                  %       Divides the first integer operand by the  b%a=0

                                                    second, and returns the remainder


                    Coding           uiz   02                                                          Critical Thinking



                      Give one word answer to the following questions:

                      a.    Name the data type which holds whole numbers.                           ...........................

                      b.   Which operation subtracts the second operand from the first?            ...........................






                        At a Glance
                        Variable is a name given to a storage area.

                        Integer, floating-point number, character, string and boolean are the common data types.
                        Data validation is the process of ensuring that the data entered by the user is a valid value
                        in the place where you are expecting an input from the user.







                       Exercise

                  A.  Tick ( ) the correct option.

                      1.  Which  of  the  following  is  a  name  given  to  a  storage  area  that  the  programs  can
                          manipulate?
                          a.  Variable                                  b.  Data type

                          c.  Code                                      d.  Syntax

                      2.  Which operator is used to assign a value to a variable?
                          a.  Arithmetic operator                       b.  Assignment operator

                          c.  Relational operator                       d.  Comparison operator




                   12     Touchcode-VII
   9   10   11   12   13   14   15   16   17   18   19