Basic HTML Version

|  | Table of Contents |  | View Full Version

Page 94 - 2615_KEC
P. 94

    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)

                       92   Premium Edition-VII

| 89 90 91 92 93 94 95 96 97 98 99 |