Page 106 - KEC Khaitan C7 Flipbook
P. 106

PROJECT NAME 2: Square Geometry Calculator
                  Software Used: CodeSkulptor

                  Objective:

                  Develop a Python program to calculate the area and perimeter of a square by using:
                      Arithmetic operators            Variables and constants             Formatted outputs
                  This program will take dynamic input for the side length of the square and display the calculated
                  area and perimeter.

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

                  Step-by-Step Instructions: (Plan IPO)

                  1.  Input: User enters the side length of the square (dynamic - varies with each user).
                  2.  Process: Use the formula for area:
                          Area=side x side              Perimeter = 4 x side                    Side=3 units

                  3.  Output: Display the total area and perimeter in the given format          Area= 9 units
                      after entering the value for the side. Refer to the sample                Perimeter= 12 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 side lengths with decimal values
                      for more accuracy.
                      Rounded Output: Display results up to two decimal places to maintain precision.








                  104   Premium Edition-VII
   101   102   103   104   105   106   107   108   109   110   111