Page 144 - KEC Khaitan C8 Flipbook
P. 144
Step 3 Output:
Display whether the number is even, odd, or prime, or display an error message for
invalid inputs.
Code:
Submission Guidelines
∑ Code File:
o Submit the Python file (.py) or share the Google Colab link.
∑ Screen Recording:
o Record a demonstration showing:
Each menu option in use.
Handling of invalid menu and number inputs.
Bonus Features
∑ Retry Mechanism:
o Allow the user to retry entering a valid input if they make an error.
∑ Extended Menu:
o Add options like checking if a number is perfect or a palindrome.
∑ Loop Limit:
o Restrict the number of iterations before exiting automatically, with a message.
Tips for Success
∑ Input Validation:
o Use try-except to handle non-numeric inputs gracefully.
∑ Edge Cases:
o Test the program with numbers like 0, 1, and large primes.
142 Premium Edition-VIII

