A collection of three interactive Python applications demonstrating core programming logic, user-input handling, and modular code design.
A straightforward arithmetic tool that performs basic operations based on user selection.
- Features: Supports Addition, Subtraction, Multiplication, and Division.
- Logic: Uses conditional branching (
if-elif-else) and local function definitions to process calculations.
A comprehensive 10-question quiz that tests general knowledge and tracks performance.
-
Features: * Multiple-choice format (A, B, C, D).
-
Real-time "Correct/Wrong" feedback.
-
Final score calculation as a percentage.
-
Option to replay without restarting the script.
-
Data Handling: Uses a dictionary for questions and a nested list for options.
A classic game against a randomized computer opponent.
- Features: * Input validation (standardizes input like "rock" or "ROCK").
- Randomized computer logic using the
randommodule. - Continuous gameplay loop.
- Control Flow: Mastery of
whileloops and complex nestedifstatements. - Data Structures: Effective use of
ListsandDictionariesto manage game data. - Functional Programming: Modularizing code into reusable functions like
check_answer()andplay_again(). - Error Prevention: Basic input handling to ensure the program doesn't crash on unexpected strings.
- Clone the repository:
git clone https://github.com/yourusername/repository-name.git
- Run any of the scripts using Python 3:
python calculator.py
Nalinakshan B.Tech Student & Aspiring VLSI Engineer I am passionate about Digital Logic Design, Verilog, and using Python to build efficient algorithms.