New Python Program: Basic File Manipulation
還沒有人認領這個 Issue。
評估
研究方向
按照 issue 中的描述建立 file_manipulation.py,先檢視必要的選單操作和 database.txt 工作流程。使用 Python 3 執行程式,並手動測試檢視、新增、更新、刪除、無效輸入、檔案遺失和檔案錯誤等情況。每個操作都能正常運作,且每次操作後都會儲存更新的資料,即表示完成。
由索引模型根據 Issue 內容生成。
描述
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!
- 主要語言
- Python
- 星號
- 0
- 分支
- 9
- PR 合併指標
- 30 天內沒有已合併 PR
貢獻指南
這個儲存庫沒有索引到貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
KALIIOWORK/basic_python_programs 的其他 Issue
-
good first issue hacktoberfest
難度 2/5 1-3 小時 新手友好度 72/100
KALIIOWORK/basic_python_programs#10 · 1 則留言 ·
-
good first issue hacktoberfest
難度 2/5 1-3 小時 新手友好度 50/100
KALIIOWORK/basic_python_programs#6 · 1 則留言 ·
-
good first issue hacktoberfest
難度 2/5 1-3 小時 新手友好度 55/100
KALIIOWORK/basic_python_programs#5 · 1 則留言 ·
-
good first issue hacktoberfest
難度 2/5 1-3 小時 新手友好度 48/100
KALIIOWORK/basic_python_programs#1 · 2 則留言 ·
查看 KALIIOWORK/basic_python_programs 的全部 Issue
相似的 Issue
-
bug
難度 2/5 1-3 小時 新手友好度 90/100
learningequality/ricecooker#747 ·
-
難度 2/5 1-3 小時 新手友好度 68/100
BSData/horus-heresy-3rd-edition#3171 ·
-
enhancement
難度 2/5 1-3 小時 新手友好度 72/100
-
難度 2/5 1-3 小時 新手友好度 76/100
run-llama/llama_index#23199 ·
-
難度 2/5 1-3 小時 新手友好度 84/100
KhronosGroup/glTF-Blender-IO#2769 ·