Simple Calculator Project
Simple Calculator Project
• Features:
• - Perform basic arithmetic operations.
• - User-friendly menu-driven interface.
• - Handles division by zero error gracefully.
Objectives
• - To demonstrate the use of conditional
statements.
• - To use functions for modular programming.
• - To make the project interactive with user
input.
Code Explanation
• 1. The code uses input() function to get user
input.
• 2. A while loop ensures the program runs until
the user exits.
• 3. Functions are created for addition,
subtraction, multiplication, and division.
Sample Code
• def add(a, b):
• return a + b