New Python Program: Simple Calculator
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 50/100
Hướng nghiên cứu
Tạo tệp có tên simple_calculator.py dưới dạng một chương trình dòng lệnh Python 3. Trước tiên, hãy xem lại các yêu cầu của tác vụ, sau đó chạy chương trình với các đầu vào ví dụ, từng phép toán số học, đầu vào không hợp lệ và phép chia cho 0. Công việc hoàn tất khi chương trình đưa ra lời nhắc rõ ràng, trả về kết quả chính xác và xử lý lỗi một cách phù hợp.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Hello Python enthusiasts! Let's enhance our repository with a Simple Calculator implemented in Python. This beginner-friendly task involves creating a command-line calculator that can perform basic arithmetic operations. This program will showcase fundamental input handling, arithmetic operations, and conditional statements in Python.
Tasks:
- Implement functions for addition, subtraction, multiplication, and division.
- Allow users to input two numbers and select an operation (+, -, *, /).
- Perform the corresponding operation and display the result to the user.
- Handle division by zero and invalid inputs gracefully.
- Provide clear instructions and error messages for the users.
Guidelines:
- Use Python 3.x for the program.
- Implement functions to handle each arithmetic operation separately.
- Ensure the calculator provides clear prompts and feedback to the user.
- Include comments in your code to explain the logic and functionality.
- Test the calculator with various inputs to ensure accurate calculations.
Example:
Welcome to the Simple Calculator!
Please enter the first number: 10
Please enter the second number: 5
Select operation (+, -, *, /): +
Result: 10 + 5 = 15
How to Contribute:
- Fork this repository.
- Create a new Python file for the Simple Calculator:
simple_calculator.py. - Write the Python program following the specified tasks and guidelines.
- Test the calculator thoroughly to ensure it functions correctly.
- Commit your changes:
git commit -m "Add Simple Calculator program" - Push to your branch:
git push origin add-simple-calculator - Open a pull request to this repository.
Your contribution will provide users with a handy tool for basic calculations. Thank you for creating this useful Python program for our repository!
- Ngôn ngữ chính
- Python
- Star
- 0
- Fork
- 9
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của KALIIOWORK/basic_python_programs
-
good first issue hacktoberfest
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
KALIIOWORK/basic_python_programs#10 · 1 bình luận ·
-
good first issue hacktoberfest
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 45/100
KALIIOWORK/basic_python_programs#8 · 2 bình luận ·
-
good first issue hacktoberfest
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 55/100
KALIIOWORK/basic_python_programs#5 · 1 bình luận ·
-
good first issue hacktoberfest
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 48/100
KALIIOWORK/basic_python_programs#1 · 2 bình luận ·
Tất cả issue của KALIIOWORK/basic_python_programs
Issue tương tự
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 90/100
learningequality/ricecooker#747 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
BSData/horus-heresy-3rd-edition#3171 ·
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
run-llama/llama_index#23199 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
KhronosGroup/glTF-Blender-IO#2769 ·