Basic HTML Version

|  | Table of Contents |  | View Full Version

Page 108 - 2615_KEC
P. 108

    Use Codeskulptor3-https://py3.codeskulptor.org/

                      Step-by-Step Instructions: (Plan IPO)
                      1.  Input: The user enters the dimensions for the rectangle (dynamic - varies with each user).

                      2.  Process: Use the formula for area:

                              Area=Length x Breadth
                              Perimeter = 2 x (Length + Breadth)

                      3.  Output: Display the total area and perimeter in the given format after entering the values for
                          the dimensions. Refer to the sample

                                                  Length = 3 units     Breadth = 2 units
                                                  Area = 6 units       Perimeter = 10 units.

                                                Code:                                             Flow:

                                                                                                   USER
                                                                                                ENTERS SIDE
                                                                                                  LENGTH

                                                                                              CALCULATE AREA

                                                                                            CALCULATE PERIMETER

                                                                                             DISPLAY TOTAL AREA

                                                                                            DISPLAY TOTAL PERIMETER

                                                                                                 PROCESS
                                                                                                 COMPLETE

                      Bonus Feature:

                          Decimal Values:  Modify  the program to  accept  and calculate  dimensions  with decimal
                          values for more accuracy.
                          Rounded Output: Display results up to two decimal places for precision.

                      106   Premium Edition-VII

| 103 104 105 106 107 108 109 110 111 112 113 |