Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!
  • Guest, before posting your code please take these rules into consideration:
    • It is required to use our BBCode feature to display your code. While within the editor click < / > or >_ and place your code within the BB Code prompt. This helps others with finding a solution by making it easier to read and easier to copy.
    • You can also use markdown to share your code. When using markdown your code will be automatically converted to BBCode. For help with markdown check out the markdown guide.
    • Don't share a wall of code. All we want is the problem area, the code related to your issue.


    To learn more about how to use our BBCode feature, please click here.

    Thank you, Code Forum.

Python I need an understanding in this scenario

trent

New Coder
Hi All,

I want someone to tell me what goes on in the following scenario, I don't need the code I just want to understand what goes where i.e., array ,Boolean etc.

Here is the scenario.

Friends of Seaview Pier is an organisation devoted to the restoration and upkeep of a pier in the town. A pier is a wooden structure that provides a walkway over the sea. The pier requires regular maintenance and the friends of the pier need to raise money for this purpose.

Members of Friends of Seaview Pier each pay $75 per year, as a contribution to the pier’s running costs. This entitles them to free admission to the pier throughout the year. They can also volunteer to help run the pier, by working at the pier entrance gate, working in the gift shop, or painting and decorating.

To provide additional income, the pier’s wooden planks can be sponsored. A brass plaque, which contains a short message of the sponsor’s choice, is fitted to a plank on the pier, for a donation of $200.

Write and test a program or programs for the Friends of Seaview Pier: • Your program or programs must include appropriate prompts for the entry of data. Data must be validated on entry. • All outputs, including error messages, need to be set out clearly and understandably. • All variables, constants and other identifiers must have meaningful names.

You will need to complete these three tasks. Each task must be fully tested.

Task 1 – becoming a member of Friends of Seaview Pier Set up a system to enable people to become members of Friends of Seaview Pier and for each new member enter: • their first name and last name • whether or not they wish to work as a volunteer ○ if they choose to volunteer, identify the area from: – the pier entrance gate – the gift shop – painting and decorating • the date of joining • whether or not they have paid the $75 fee. All of this information needs to be stored using suitable data structures.

Task 2 – using the membership data Extend the program in Task 1 so that a list of the first and last names of members can be output in any of the following categories: • Members who have chosen to work as volunteers. • Volunteers who would like to work at the pier entrance gate. • Volunteers who would like to work in the gift shop. • Volunteers who would like to help with painting and decorating tasks. • Members whose membership has expired (they have not re-joined this year). • Members who have not yet paid their $75 fee.

Task 3 – sponsoring a wooden plank Add an additional option to the program in Task 1 to enable the pier’s wooden planks to be sponsored. Separate data structures should be used to store the names of the individuals and the short messages they would like to have written on their brass plaque. An output would display everything that was input for the sponsor to confirm. If errors are found, the program should allow data to be re-entered. Once complete, the data is stored and the sponsor is charged $200.
 
Task 1:
- For each new member: get their first name; last name; whether or not they wish to work as a volunteer; if they do want to work as a volunteer, where do they want to work from (choose from: working at the pier entrance gate; the gift shop; painting and decorating), and have they paid the $75 dollar fee. All this data needs to be stored in a suitable data structure (bool, string etc.).

Task 2:

- Extend the first program so, when one of the following categories are picked, it outputs the first and last names of people who are in that category: members who have chose to work as volunteers; volunteers who have chosen to work at the pier entrance gate; volunteers who would like to work at the gift shop; volunteers who would like to help with painting and decorting tasks; members whose memberships have expired (so they haven't re-joined this year); members who have not yet paid their $75 fee.

Task 3:
- Add on option to the code made in task 1 that allows the users to pay $200 if they want to have a brass plque with their name on it to be added to the pier's wooden planks. When the user has inputted their name and the short message they would like on the plaque, you must print it out again and let the user change it if it is wrong.
 
Ah ok, so for task 1 I will need to use String, list and arrays. What about task 2 and 3 what python function do i need to use?
I think for task 1 you should use a boolean for whether or not they wish to work as a volunteer. For task 2 you could maybe use a for loop to loop through all the participants in the selected category. For task 3 you could get the user's name etc. in a while loop, and if they say the inputted information is correct, you should break out of the loop.
 

New Threads

Latest posts

Buy us a coffee!

Back
Top Bottom