Page 108 - KEC Khaitan C7 Flipbook
P. 108
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.
106 Premium Edition-VII

