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

PROJECT NAME 4: Number Identification
                 Software Used: CodeSkulptor

                 Objective:
                 Develop a Python program (WAP) to check if a number is:

                     Positive                          Negative                            Zero
                 The program will use:

                     Arithmetic operators                                  Variables and constants
                     Conditional statements (if, elif, else)               Formatted outputs
                 Use Codeskulptor3-https://py3.codeskulptor.org/

                 Step-by-Step Instructions: (Plan IPO)

                 1.  Input: User enters a number (dynamic - varies with each user).
                 2.  Process: Check  if the  number  is  greater  than zero, less than zero, or exactly  zero using
                     conditional statements (if, elif, else).
                 3.  Output: Display a message indicating whether the number is positive, negative, or zero. Refer
                     to the sample
                                                The number -2 is a negative number.

                                          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 identify decimal values.

                     Repeat Check: Allow the user to input multiple numbers in a loop until they decide to exit.
                     Validation: Add input validation to ensure the user enters numeric values only.




                                                                                                 Hands-On Project  111
   108   109   110   111   112   113   114   115   116   117   118