New Python Program: Basic File Manipulation
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 45/100
Hướng nghiên cứu
Tạo file_manipulation.py như được mô tả trong issue, bắt đầu bằng việc xem xét các thao tác menu bắt buộc và workflow của database.txt. Chạy chương trình bằng Python 3 và kiểm tra thủ công các trường hợp xem, thêm, cập nhật, xóa, đầu vào không hợp lệ, thiếu tệp và lỗi tệp. Hoàn thành khi mọi thao tác đều hoạt động và dữ liệu đã cập nhật được lưu sau mỗi thao tác.
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 expand our repository with a Python program that demonstrates basic file manipulation operations. This beginner-friendly task involves reading from and writing to text files, allowing users to create, read, update, and delete entries in a simple database file. This task will showcase file handling, loops, and conditional statements in Python.
Tasks:
- Create a Python program that reads data from a text file (
database.txt) if it exists. - Allow users to view existing entries, add new entries, update existing entries, and delete entries.
- Implement user-friendly menus and prompts for each operation.
- Ensure the program handles errors gracefully, such as invalid file access or incorrect user inputs.
- Save the updated data back to the text file after each operation.
Guidelines:
- Use Python 3.x for the program.
- Utilize file handling functions (
open,read,write,close) to manipulate the database file. - Include comments in your code to explain the logic and functionality.
- Test the program thoroughly, including edge cases and error scenarios.
Example:
Welcome to the Basic File Manipulation Program!
1. View Entries
2. Add Entry
3. Update Entry
4. Delete Entry
5. Exit
Select an option: 2
Enter name: John Doe
Enter age: 30
Entry added successfully!
1. View Entries
2. Add Entry
3. Update Entry
4. Delete Entry
5. Exit
Select an option: 1
Entries:
1. Name: John Doe, Age: 30
...
How to Contribute:
- Fork this repository.
- Create a new Python file for the Basic File Manipulation Program:
file_manipulation.py. - Write the Python program following the specified tasks and guidelines.
- Test the program thoroughly to ensure it functions correctly.
- Commit your changes:
git commit -m "Add Basic File Manipulation Program" - Push to your branch:
git push origin add-file-manipulation - Open a pull request to this repository.
Your contribution will provide users with a practical understanding of file manipulation in Python. 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ó 2/5 1-3 giờ Mức phù hợp với người mới 50/100
KALIIOWORK/basic_python_programs#6 · 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 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 🔔 Pending processing
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
jumpserver/jumpserver#17584 ·
-
link-check link-check:sphinx-theme
Độ 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 90/100
modelscope/DiffSynth-Studio#1702 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
qgis/QGIS-Documentation#11275 ·
-
bug priority:normal ready-for-dev
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
OpenHands/extensions#626 · 1 bình luận ·