Project Level 2: Intermediate
This project is designed for intermediate learners who know Python fundamentals and are practicing building complete programs.
Project Description
Create a terminal-based note manager that allows users to add or view notes stored in a text file. Try to use Python 3.10 or newer and use match-case statements.
How the Project Works
(1) The program starts by prompting the user to choose an option (e.g., 1 for adding a note). (2) The user submits a new note. (3) The program stores the note in a text file in the background and lets the user choose an option again. (4) If the user chooses 2, all the notes should be displayed on the screen.
Prerequisites
Required Libraries: No libraries are required.
Required Files: No files are required.
IDE: You can use any IDE on your computer to code the project.
Danger Zone
Once you code the project, compare it with our solution below:
notes=[]
options=int(input(''' Menu:
1.add a notes
2.View all notes
3.exit
Choose an option (1,2 or 3):'''))
while options !=3 :
if options==1:
note=input("enter your note")
notes.append(note)
print("Note added")
elif options==2:
print("Notes List :")
for i in notes:
print("-",i)
else :
print("Please enter the right option")
options=int(input(''' Menu:
1.add a notes
2.View all notes
3.exit
Choose an option (1,2 or 3):''') )