Page 68 - KEC Khaitan C7 Flipbook
P. 68

Write 'T' for True and 'F' for false.
                                           1.  Variables are memory reference points where we store values.
                          uiz    Bee       2.  An Integer is a collection of one or more characters put in single

                                             or double-quotes.





                            OPERATORS IN PYTHON
                                                                                                   20 + 10
                  Operators  are the special  symbols that  are used  to  perform
                  computations. The values which the operators use to get the output
                                                                                               Operand      Operator
                  are called operands.

                     (+) Addition operator: It is an arithmetic operator which is used to perform addition. Arithmetic
                    operators  perform arithmetic  operations  between  two  operands.  Some  more  arithmetic

                    operators are:
                     (–) Subtraction operator: It subtracts the right-hand operand from the left-hand operand.

                     (*) Multiplication operator: It multiplies values on either side of the operator.

                     (/) Division operator: It divides the left-hand operand by the right-hand operand.

                      (%) Modulus operator: It divides the left-hand operand by the right-hand operand and returns
                    the remainder.

                     (**) Exponentiation operator: It performs exponential (power) calculation on operands.

                     (//) Floor or Integer division operator: It divides and cuts the fractional part from the result.




                            MORE PROGRAMS

                  Program 1. Write a program to input your name, school name and also print.

                      Program1.py

                   File  Edit  Format   Run   Options  Window    Help

                   # Store Input Data
                   name = input(" Enter your name: ")
                   school_name = input(" Enter your school name: ")
                   # Display the Input Data
                   print ("Name:",name) # The print() function is used to display output in Python.
                   print ("School Name:", school_name)








                   66   Premium Edition-VII
   63   64   65   66   67   68   69   70   71   72   73