The Student Room Group

I need help with coding this

Software developer has been asked to write a program to manage membership information or
Sports club Membership Information will be stored in a text file. Each line of the file will represent
Information about one member
The information that needs to be stored is as follows

membership ID
name
email addresS
month joined
membership active

Information about a member will be held in N. Each STRING Will occupy one in in
file.

TASK 1.1
Many pieces of Information will have loved formats. For example, membership active will have one of
two possible values as follows

Value. Meaning

True Membership still active

Flase Membership expired




1. Decide on a format for the membership ID for example, four digits "1234

2.Decide on a format for the month joined. This could be the full name of the month, first three
letters or a two-digit code, for example. 03 to represent the month of March

TASK 1.2
Design a suitable format for each single STRING to allow the program to extract the different pieces of
information, when reading from the file.

TASK 1.3

Produce program flowcharts to represent the algorithm that could be used to validate the format of
the different pieces of information, as decide n TASK
1



PLEASE GIVE ME CODE FOR THIS(PYTHON)
Original post by BeastyKaren6921
Software developer has been asked to write a program to manage membership information or
Sports club Membership Information will be stored in a text file. Each line of the file will represent
Information about one member
The information that needs to be stored is as follows

membership ID
name
email addresS
month joined
membership active

Information about a member will be held in N. Each STRING Will occupy one in in
file.

TASK 1.1
Many pieces of Information will have loved formats. For example, membership active will have one of
two possible values as follows

Value. Meaning

True Membership still active

Flase Membership expired




1. Decide on a format for the membership ID for example, four digits "1234

2.Decide on a format for the month joined. This could be the full name of the month, first three
letters or a two-digit code, for example. 03 to represent the month of March

TASK 1.2
Design a suitable format for each single STRING to allow the program to extract the different pieces of
information, when reading from the file.

TASK 1.3

Produce program flowcharts to represent the algorithm that could be used to validate the format of
the different pieces of information, as decide n TASK
1



PLEASE GIVE ME CODE FOR THIS(PYTHON)


Have you done those tasks? None of them say anything about programming - these look like a bunch of design tasks about making decisions on the format of your data and creating a flowchart to explain how you would validate that the content of a file matches the data you've decided on.

If you need to write some Python, then you still need to do those tasks first because the decisions you make will determine what your Python code needs to do. It's not possible to write any python until you've done this.


If you've got Microsoft Excel, I'd suggest you try creating some test data which matches the description you've been given in a table, then save that table as .CSV format and open up the .CSV file it creates in Notepad to see what it looks like. Doing that might help you decide on those tasks and get an idea of what you need to do. Then later if you need to do something like this in Python you'll find a lot of examples - e.g. https://realpython.com/python-csv/

Quick Reply

Latest

Trending

Trending