Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rajtilak-2020/python_calculator
This Python script creates a simple interactive REPL (Read-Eval-Print Loop). It continuously prompts the user for input, evaluates the input as a Python expression using eval(), and prints the result.
https://github.com/rajtilak-2020/python_calculator
calculator coding project python
Last synced: 13 days ago
JSON representation
This Python script creates a simple interactive REPL (Read-Eval-Print Loop). It continuously prompts the user for input, evaluates the input as a Python expression using eval(), and prints the result.
- Host: GitHub
- URL: https://github.com/rajtilak-2020/python_calculator
- Owner: rajtilak-2020
- Created: 2024-12-06T11:56:53.000Z (28 days ago)
- Default Branch: main
- Last Pushed: 2024-12-06T12:02:39.000Z (28 days ago)
- Last Synced: 2024-12-06T13:38:34.051Z (28 days ago)
- Topics: calculator, coding, project, python
- Language: Python
- Homepage:
- Size: 1.95 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 🎨 **Interactive Python REPL** 🐍
This lightweight script offers a simple, intuitive interface for evaluating Python expressions on the fly.
---
## 🌟 **Features**
- 🔄 **Infinite Loop**: Continuously evaluates Python expressions until you choose to exit.
- 🧠 **Dynamic Evaluation**: Supports any valid Python expression with instant results.
- ⚡ **Lightweight and Fast**: Minimalistic design for maximum efficiency.
- 🎮 **Interactive**: Get immediate feedback for your inputs.---
## 🚀 **How It Works**
The script operates as a **Read-Eval-Print Loop (REPL)**:
1. 🖥️ Prompts you to enter a Python expression.
2. 🤖 Dynamically evaluates the input using Python's built-in `eval()`.
3. 📢 Displays the result of the evaluation.**Example:**
```plaintext
>>> 5 + 7
12
>>> "Hello, " + "world!"
Hello, world!
>>> [x**2 for x in range(5)]
[0, 1, 4, 9, 16]