I want to ask what the (probably assignment) is about. Do you have to write your own basic database or are you asking how to setup a way with a pre-existing database to store the data?
— What does mean ( %.2f )?
— Float precision two signs
— I didn't understand your purpose but I look for answer . I am sorry.
— With your hands
— You need to have a specific structure of your file Like organizing it as