Page 112 - KEC Khaitan C8.5 Flipbook
P. 112

PROJECT NAME 3: Rectangle Geometry Calculator
                  Software Used: CodeSkulptor

                  Objective:

                  Develop a Python program to calculate the area and perimeter of a rectangle by using:
                      Arithmetic operators            Variables and constants             Formatted outputs

                  This program will take dynamic input for the length and breadth of the rectangle and display the
                  calculated area and perimeter.
                  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.



                  110   Premium Edition-VIII
   107   108   109   110   111   112   113   114   115   116   117