New Python Program: Basic File Manipulation
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Anfängerfreundlichkeit
- 45/100
Rechercherichtung
Erstelle file_manipulation.py wie im Issue beschrieben und beginne damit, die erforderlichen Menüoperationen und den database.txt-Workflow zu überprüfen. Führe das Programm mit Python 3 aus und teste manuell das Anzeigen, Hinzufügen, Aktualisieren und Löschen sowie Fälle mit ungültigen Eingaben, fehlender Datei und Dateifehlern. Die Aufgabe ist abgeschlossen, wenn jede Operation funktioniert und die aktualisierten Daten nach jeder Operation gespeichert werden.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
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!
- Vorherrschende Sprache
- Python
- Sterne
- 0
- Forks
- 9
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus KALIIOWORK/basic_python_programs
-
good first issue hacktoberfest
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
KALIIOWORK/basic_python_programs#10 · 1 Kommentar ·
-
good first issue hacktoberfest
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 50/100
KALIIOWORK/basic_python_programs#6 · 1 Kommentar ·
-
good first issue hacktoberfest
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 55/100
KALIIOWORK/basic_python_programs#5 · 1 Kommentar ·
-
good first issue hacktoberfest
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 48/100
KALIIOWORK/basic_python_programs#1 · 2 Kommentare ·
Alle Issues in KALIIOWORK/basic_python_programs
Ähnliche Issues
-
from:qa priority:P2 reliability tech-debt
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
spec-kitty/spec-kitty#4874 ·
-
fix: inaccuracy ⚠️
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
uabrc/uabrc.github.io#1255 · 1 Kommentar ·
-
kind:bug needs-triage
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 88/100
-
docs
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 85/100
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 84/100
ethereum-optimism/factory#64 ·