Ojulari123 / RAA-projects

0 stars 0 forks source link

Tasks #1 #2

Closed solomonaboyeji closed 3 months ago

solomonaboyeji commented 3 months ago

These are my comments on the first task you worked on note.py

  1. Rather than hard-coding the value of the current year into a variable, you should read it dynamically from the user's computer. Imagine that someone wants to use this script in year 2025, your code will have a bug by then. In order to get this fixed, simple get the current year from the datetime library in python. (1) Date and Time in python (2) Get current year in python
  2. In your notes.txt, add the date and time the user added these notes. E.g. 2024-05-29 : 10:18 AM => Here is my note!
  3. Write another function that prints out all the notes the user has ever written.
  4. Research on how you can structure these notes.txt and turn it into a json file.
    {
    "name": "Solomon", 
    "year_of_birth": "2023",
    "notes": [
     "2024-05-29 : 10:18 AM": "Here is my note!",
     "2024-05-29 : 10:28 AM": "Here is another note!",
    ]
    }
solomonaboyeji commented 3 months ago

Ensure you read the links I shared above, you should read them in the order I specify (1) and (2). Also while reading you must write out the code in your python scripts or interpreter and run them.

You should also have a note where you jot things down so you can quickly go back to them in the future, I mean actual book you should write these things in.

Ojulari123 commented 3 months ago

After the initial submission and debugging, I identified these issues:

For Note.json:

solomonaboyeji commented 3 months ago

One comment, you should be adding the notes data into the JSON file rather than writing another script that converts the txt into JSON.