New Python Program: Basic File Manipulation
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 45/100
Direzione di ricerca
Crea file_manipulation.py come descritto nell’issue, iniziando con la revisione delle operazioni di menu richieste e del workflow di database.txt. Esegui il programma con Python 3 e verifica manualmente i casi di visualizzazione, aggiunta, aggiornamento, eliminazione, input non valido, file mancante ed errore del file. Il lavoro è completato quando ogni operazione funziona e i dati aggiornati vengono salvati dopo ogni operazione.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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!
- Lingua principale
- Python
- Stelle
- 0
- Fork
- 9
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di KALIIOWORK/basic_python_programs
-
good first issue hacktoberfest
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
KALIIOWORK/basic_python_programs#10 · 1 commento ·
-
good first issue hacktoberfest
Difficoltà 2/5 1-3 ore Idoneità per principianti 50/100
KALIIOWORK/basic_python_programs#6 · 1 commento ·
-
good first issue hacktoberfest
Difficoltà 2/5 1-3 ore Idoneità per principianti 55/100
KALIIOWORK/basic_python_programs#5 · 1 commento ·
-
good first issue hacktoberfest
Difficoltà 2/5 1-3 ore Idoneità per principianti 48/100
KALIIOWORK/basic_python_programs#1 · 2 commenti ·
Tutte le issue di KALIIOWORK/basic_python_programs
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
-
🐛 Bug 🔔 Pending processing
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
jumpserver/jumpserver#17584 ·