Fitness Center Code [on hold]











up vote
-6
down vote

favorite












Hi,
I'm writing a piece of code for a class with the following constrains:





A health and fitness club offer both group and individual training sessions. They currently employ three personal trainers.



Individual sessions last for one hours, whilst group sessions last for two hours. Following every group session, a trainer must take a break. When a trainer has a free slot, this is indicated by an F.



A personal trainer works from 7:00AM to 17:00PM every day, with the last session taking place at 4PM. An example of a personal trainers’ day is shown below.



Index   0   1   2   3   4   5   6   7   8   9
DATA I I G G B F F I I I


This trainer has 2 individual sessions (I), followed by a group session(G). This is then followed by a Break (B) and two slots free (F) and three individual sessions at the end of the day.



A personal trainer is paid based on their qualifications. A trainer can either be newly qualified, fully qualified or part time.



Newly Qualified (N) I: $20
G: $40



Fully Qualified (F) I: $50
$120



Part-time (P) I: $15
G: $35



Task 1: Health Centre Analysis



Create a program that will achieve the following:




  1. Calculate, and display, the total earnings of each individual

  2. Calculate, and display, the total earnings of the fitness centre

  3. Display which of the three instructors has had the most bookings that day.


Task 2: Booking System for individual appointments (NOT GROUPS!)



Create a program that will achieve the following:




  1. Allow the user to specific time slot to book a session. Your program should check and display details of any trainer who is available, or if none are available.


  2. If none are available, it should display the next available free appointment time



    Current booking details for Monday



    trainerA = [‘G’,’G’,’B’,’I,’I’,’F’, ‘F’, ‘F’, ‘F’]
    trainerB = [‘I’,’F’,’F’,’F,’F’,’F’, ‘F’, ‘F’, ‘F’]
    trainerC = [‘I’,’I’,’G’,’G’,’B’,’F’, ‘I’, ‘I’, ‘I’]




EXPECTED OUTPUT TASK 1



Enter Qualification Level for Trainer 1: N
This trainer has earned: _____________



Enter Qualification Level for Trainer 2: P
This trainer has earned: _____________



Enter Qualification Level for Trainer 3: F
This trainer has earned: _____________



Total Earnings for centre: ____________________



The busiest trainer is ______________ who had ______________ bookings



EXPECTED OUTPUT TASK 2 (Example 1)



Enter Time to check bookings: 6
Sorry, the earliest bookings are 7am and latest 16:00pm
Enter Time to check bookings: 1
Sorry, the earliest bookings are 7am and latest 16:00pm
Enter Time to check bookings: 13



Trainer 1 is available at this time
Trainer 2 is available at this time
Trainer 3 is available at this time



EXPECTED OUTPUT TASK 2 (Example 2)



Enter time to check bookings: 7



Sorry, at 7am there are no available appointments.



Trainer1 is next free availability is 12PM
Trainer2 is next free availability is 8AM
Trainer3 is next free availability is 12AM





*Just to confirm, both tasks require use of the trainer lists exactly as specified above. These lists can't be changed. If anyone has any pointers / code, *










share|improve this question







New contributor




Sha Pin is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











put on hold as off-topic by VisualMelon, BCdotWEB, Toby Speight, Mast, Graipher 2 days ago


This question appears to be off-topic. The users who voted to close gave this specific reason:


  • "Code not implemented or not working as intended: Code Review is a community where programmers peer-review your working code to address issues such as security, maintainability, performance, and scalability. We require that the code be working correctly, to the best of the author's knowledge, before proceeding with a review." – Toby Speight, Mast, Graipher

If this question can be reworded to fit the rules in the help center, please edit the question.









  • 2




    Please attempt to write some code and post it so that we can review it. The purpose of Code Review is not to offer you new code suggestions, but you work on your existing, working, code.
    – Reinderien
    2 days ago










  • Questions must include the code to be reviewed. Links to code hosted on third-party sites are permissible, but the most relevant excerpts must be embedded in the question itself. Please follow the tour and read "How do I ask a good question?", "What topics can I ask about here?" and "What types of questions should I avoid asking?".
    – BCdotWEB
    2 days ago










  • Questions asking for advice about code not yet written are off-topic. Please follow the tour and read "How do I ask a good question?", "What topics can I ask about here?" and "What types of questions should I avoid asking?".
    – BCdotWEB
    2 days ago






  • 1




    Welcome to Code Review! We review code. Where's your code?
    – Mast
    2 days ago










  • Welcome on Code Review. We do not provide code-writing services here. We recommend that you search online tutorials and examples in order for you to learn how to write your own code. See What topics can I ask about? for reference. Once you have written working code, you're welcome to ask a new question here and we can then help you improve it!
    – Calak
    2 days ago















up vote
-6
down vote

favorite












Hi,
I'm writing a piece of code for a class with the following constrains:





A health and fitness club offer both group and individual training sessions. They currently employ three personal trainers.



Individual sessions last for one hours, whilst group sessions last for two hours. Following every group session, a trainer must take a break. When a trainer has a free slot, this is indicated by an F.



A personal trainer works from 7:00AM to 17:00PM every day, with the last session taking place at 4PM. An example of a personal trainers’ day is shown below.



Index   0   1   2   3   4   5   6   7   8   9
DATA I I G G B F F I I I


This trainer has 2 individual sessions (I), followed by a group session(G). This is then followed by a Break (B) and two slots free (F) and three individual sessions at the end of the day.



A personal trainer is paid based on their qualifications. A trainer can either be newly qualified, fully qualified or part time.



Newly Qualified (N) I: $20
G: $40



Fully Qualified (F) I: $50
$120



Part-time (P) I: $15
G: $35



Task 1: Health Centre Analysis



Create a program that will achieve the following:




  1. Calculate, and display, the total earnings of each individual

  2. Calculate, and display, the total earnings of the fitness centre

  3. Display which of the three instructors has had the most bookings that day.


Task 2: Booking System for individual appointments (NOT GROUPS!)



Create a program that will achieve the following:




  1. Allow the user to specific time slot to book a session. Your program should check and display details of any trainer who is available, or if none are available.


  2. If none are available, it should display the next available free appointment time



    Current booking details for Monday



    trainerA = [‘G’,’G’,’B’,’I,’I’,’F’, ‘F’, ‘F’, ‘F’]
    trainerB = [‘I’,’F’,’F’,’F,’F’,’F’, ‘F’, ‘F’, ‘F’]
    trainerC = [‘I’,’I’,’G’,’G’,’B’,’F’, ‘I’, ‘I’, ‘I’]




EXPECTED OUTPUT TASK 1



Enter Qualification Level for Trainer 1: N
This trainer has earned: _____________



Enter Qualification Level for Trainer 2: P
This trainer has earned: _____________



Enter Qualification Level for Trainer 3: F
This trainer has earned: _____________



Total Earnings for centre: ____________________



The busiest trainer is ______________ who had ______________ bookings



EXPECTED OUTPUT TASK 2 (Example 1)



Enter Time to check bookings: 6
Sorry, the earliest bookings are 7am and latest 16:00pm
Enter Time to check bookings: 1
Sorry, the earliest bookings are 7am and latest 16:00pm
Enter Time to check bookings: 13



Trainer 1 is available at this time
Trainer 2 is available at this time
Trainer 3 is available at this time



EXPECTED OUTPUT TASK 2 (Example 2)



Enter time to check bookings: 7



Sorry, at 7am there are no available appointments.



Trainer1 is next free availability is 12PM
Trainer2 is next free availability is 8AM
Trainer3 is next free availability is 12AM





*Just to confirm, both tasks require use of the trainer lists exactly as specified above. These lists can't be changed. If anyone has any pointers / code, *










share|improve this question







New contributor




Sha Pin is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











put on hold as off-topic by VisualMelon, BCdotWEB, Toby Speight, Mast, Graipher 2 days ago


This question appears to be off-topic. The users who voted to close gave this specific reason:


  • "Code not implemented or not working as intended: Code Review is a community where programmers peer-review your working code to address issues such as security, maintainability, performance, and scalability. We require that the code be working correctly, to the best of the author's knowledge, before proceeding with a review." – Toby Speight, Mast, Graipher

If this question can be reworded to fit the rules in the help center, please edit the question.









  • 2




    Please attempt to write some code and post it so that we can review it. The purpose of Code Review is not to offer you new code suggestions, but you work on your existing, working, code.
    – Reinderien
    2 days ago










  • Questions must include the code to be reviewed. Links to code hosted on third-party sites are permissible, but the most relevant excerpts must be embedded in the question itself. Please follow the tour and read "How do I ask a good question?", "What topics can I ask about here?" and "What types of questions should I avoid asking?".
    – BCdotWEB
    2 days ago










  • Questions asking for advice about code not yet written are off-topic. Please follow the tour and read "How do I ask a good question?", "What topics can I ask about here?" and "What types of questions should I avoid asking?".
    – BCdotWEB
    2 days ago






  • 1




    Welcome to Code Review! We review code. Where's your code?
    – Mast
    2 days ago










  • Welcome on Code Review. We do not provide code-writing services here. We recommend that you search online tutorials and examples in order for you to learn how to write your own code. See What topics can I ask about? for reference. Once you have written working code, you're welcome to ask a new question here and we can then help you improve it!
    – Calak
    2 days ago













up vote
-6
down vote

favorite









up vote
-6
down vote

favorite











Hi,
I'm writing a piece of code for a class with the following constrains:





A health and fitness club offer both group and individual training sessions. They currently employ three personal trainers.



Individual sessions last for one hours, whilst group sessions last for two hours. Following every group session, a trainer must take a break. When a trainer has a free slot, this is indicated by an F.



A personal trainer works from 7:00AM to 17:00PM every day, with the last session taking place at 4PM. An example of a personal trainers’ day is shown below.



Index   0   1   2   3   4   5   6   7   8   9
DATA I I G G B F F I I I


This trainer has 2 individual sessions (I), followed by a group session(G). This is then followed by a Break (B) and two slots free (F) and three individual sessions at the end of the day.



A personal trainer is paid based on their qualifications. A trainer can either be newly qualified, fully qualified or part time.



Newly Qualified (N) I: $20
G: $40



Fully Qualified (F) I: $50
$120



Part-time (P) I: $15
G: $35



Task 1: Health Centre Analysis



Create a program that will achieve the following:




  1. Calculate, and display, the total earnings of each individual

  2. Calculate, and display, the total earnings of the fitness centre

  3. Display which of the three instructors has had the most bookings that day.


Task 2: Booking System for individual appointments (NOT GROUPS!)



Create a program that will achieve the following:




  1. Allow the user to specific time slot to book a session. Your program should check and display details of any trainer who is available, or if none are available.


  2. If none are available, it should display the next available free appointment time



    Current booking details for Monday



    trainerA = [‘G’,’G’,’B’,’I,’I’,’F’, ‘F’, ‘F’, ‘F’]
    trainerB = [‘I’,’F’,’F’,’F,’F’,’F’, ‘F’, ‘F’, ‘F’]
    trainerC = [‘I’,’I’,’G’,’G’,’B’,’F’, ‘I’, ‘I’, ‘I’]




EXPECTED OUTPUT TASK 1



Enter Qualification Level for Trainer 1: N
This trainer has earned: _____________



Enter Qualification Level for Trainer 2: P
This trainer has earned: _____________



Enter Qualification Level for Trainer 3: F
This trainer has earned: _____________



Total Earnings for centre: ____________________



The busiest trainer is ______________ who had ______________ bookings



EXPECTED OUTPUT TASK 2 (Example 1)



Enter Time to check bookings: 6
Sorry, the earliest bookings are 7am and latest 16:00pm
Enter Time to check bookings: 1
Sorry, the earliest bookings are 7am and latest 16:00pm
Enter Time to check bookings: 13



Trainer 1 is available at this time
Trainer 2 is available at this time
Trainer 3 is available at this time



EXPECTED OUTPUT TASK 2 (Example 2)



Enter time to check bookings: 7



Sorry, at 7am there are no available appointments.



Trainer1 is next free availability is 12PM
Trainer2 is next free availability is 8AM
Trainer3 is next free availability is 12AM





*Just to confirm, both tasks require use of the trainer lists exactly as specified above. These lists can't be changed. If anyone has any pointers / code, *










share|improve this question







New contributor




Sha Pin is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











Hi,
I'm writing a piece of code for a class with the following constrains:





A health and fitness club offer both group and individual training sessions. They currently employ three personal trainers.



Individual sessions last for one hours, whilst group sessions last for two hours. Following every group session, a trainer must take a break. When a trainer has a free slot, this is indicated by an F.



A personal trainer works from 7:00AM to 17:00PM every day, with the last session taking place at 4PM. An example of a personal trainers’ day is shown below.



Index   0   1   2   3   4   5   6   7   8   9
DATA I I G G B F F I I I


This trainer has 2 individual sessions (I), followed by a group session(G). This is then followed by a Break (B) and two slots free (F) and three individual sessions at the end of the day.



A personal trainer is paid based on their qualifications. A trainer can either be newly qualified, fully qualified or part time.



Newly Qualified (N) I: $20
G: $40



Fully Qualified (F) I: $50
$120



Part-time (P) I: $15
G: $35



Task 1: Health Centre Analysis



Create a program that will achieve the following:




  1. Calculate, and display, the total earnings of each individual

  2. Calculate, and display, the total earnings of the fitness centre

  3. Display which of the three instructors has had the most bookings that day.


Task 2: Booking System for individual appointments (NOT GROUPS!)



Create a program that will achieve the following:




  1. Allow the user to specific time slot to book a session. Your program should check and display details of any trainer who is available, or if none are available.


  2. If none are available, it should display the next available free appointment time



    Current booking details for Monday



    trainerA = [‘G’,’G’,’B’,’I,’I’,’F’, ‘F’, ‘F’, ‘F’]
    trainerB = [‘I’,’F’,’F’,’F,’F’,’F’, ‘F’, ‘F’, ‘F’]
    trainerC = [‘I’,’I’,’G’,’G’,’B’,’F’, ‘I’, ‘I’, ‘I’]




EXPECTED OUTPUT TASK 1



Enter Qualification Level for Trainer 1: N
This trainer has earned: _____________



Enter Qualification Level for Trainer 2: P
This trainer has earned: _____________



Enter Qualification Level for Trainer 3: F
This trainer has earned: _____________



Total Earnings for centre: ____________________



The busiest trainer is ______________ who had ______________ bookings



EXPECTED OUTPUT TASK 2 (Example 1)



Enter Time to check bookings: 6
Sorry, the earliest bookings are 7am and latest 16:00pm
Enter Time to check bookings: 1
Sorry, the earliest bookings are 7am and latest 16:00pm
Enter Time to check bookings: 13



Trainer 1 is available at this time
Trainer 2 is available at this time
Trainer 3 is available at this time



EXPECTED OUTPUT TASK 2 (Example 2)



Enter time to check bookings: 7



Sorry, at 7am there are no available appointments.



Trainer1 is next free availability is 12PM
Trainer2 is next free availability is 8AM
Trainer3 is next free availability is 12AM





*Just to confirm, both tasks require use of the trainer lists exactly as specified above. These lists can't be changed. If anyone has any pointers / code, *







python algorithm programming-challenge






share|improve this question







New contributor




Sha Pin is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











share|improve this question







New contributor




Sha Pin is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|improve this question




share|improve this question






New contributor




Sha Pin is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









asked 2 days ago









Sha Pin

1




1




New contributor




Sha Pin is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





Sha Pin is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






Sha Pin is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




put on hold as off-topic by VisualMelon, BCdotWEB, Toby Speight, Mast, Graipher 2 days ago


This question appears to be off-topic. The users who voted to close gave this specific reason:


  • "Code not implemented or not working as intended: Code Review is a community where programmers peer-review your working code to address issues such as security, maintainability, performance, and scalability. We require that the code be working correctly, to the best of the author's knowledge, before proceeding with a review." – Toby Speight, Mast, Graipher

If this question can be reworded to fit the rules in the help center, please edit the question.




put on hold as off-topic by VisualMelon, BCdotWEB, Toby Speight, Mast, Graipher 2 days ago


This question appears to be off-topic. The users who voted to close gave this specific reason:


  • "Code not implemented or not working as intended: Code Review is a community where programmers peer-review your working code to address issues such as security, maintainability, performance, and scalability. We require that the code be working correctly, to the best of the author's knowledge, before proceeding with a review." – Toby Speight, Mast, Graipher

If this question can be reworded to fit the rules in the help center, please edit the question.








  • 2




    Please attempt to write some code and post it so that we can review it. The purpose of Code Review is not to offer you new code suggestions, but you work on your existing, working, code.
    – Reinderien
    2 days ago










  • Questions must include the code to be reviewed. Links to code hosted on third-party sites are permissible, but the most relevant excerpts must be embedded in the question itself. Please follow the tour and read "How do I ask a good question?", "What topics can I ask about here?" and "What types of questions should I avoid asking?".
    – BCdotWEB
    2 days ago










  • Questions asking for advice about code not yet written are off-topic. Please follow the tour and read "How do I ask a good question?", "What topics can I ask about here?" and "What types of questions should I avoid asking?".
    – BCdotWEB
    2 days ago






  • 1




    Welcome to Code Review! We review code. Where's your code?
    – Mast
    2 days ago










  • Welcome on Code Review. We do not provide code-writing services here. We recommend that you search online tutorials and examples in order for you to learn how to write your own code. See What topics can I ask about? for reference. Once you have written working code, you're welcome to ask a new question here and we can then help you improve it!
    – Calak
    2 days ago














  • 2




    Please attempt to write some code and post it so that we can review it. The purpose of Code Review is not to offer you new code suggestions, but you work on your existing, working, code.
    – Reinderien
    2 days ago










  • Questions must include the code to be reviewed. Links to code hosted on third-party sites are permissible, but the most relevant excerpts must be embedded in the question itself. Please follow the tour and read "How do I ask a good question?", "What topics can I ask about here?" and "What types of questions should I avoid asking?".
    – BCdotWEB
    2 days ago










  • Questions asking for advice about code not yet written are off-topic. Please follow the tour and read "How do I ask a good question?", "What topics can I ask about here?" and "What types of questions should I avoid asking?".
    – BCdotWEB
    2 days ago






  • 1




    Welcome to Code Review! We review code. Where's your code?
    – Mast
    2 days ago










  • Welcome on Code Review. We do not provide code-writing services here. We recommend that you search online tutorials and examples in order for you to learn how to write your own code. See What topics can I ask about? for reference. Once you have written working code, you're welcome to ask a new question here and we can then help you improve it!
    – Calak
    2 days ago








2




2




Please attempt to write some code and post it so that we can review it. The purpose of Code Review is not to offer you new code suggestions, but you work on your existing, working, code.
– Reinderien
2 days ago




Please attempt to write some code and post it so that we can review it. The purpose of Code Review is not to offer you new code suggestions, but you work on your existing, working, code.
– Reinderien
2 days ago












Questions must include the code to be reviewed. Links to code hosted on third-party sites are permissible, but the most relevant excerpts must be embedded in the question itself. Please follow the tour and read "How do I ask a good question?", "What topics can I ask about here?" and "What types of questions should I avoid asking?".
– BCdotWEB
2 days ago




Questions must include the code to be reviewed. Links to code hosted on third-party sites are permissible, but the most relevant excerpts must be embedded in the question itself. Please follow the tour and read "How do I ask a good question?", "What topics can I ask about here?" and "What types of questions should I avoid asking?".
– BCdotWEB
2 days ago












Questions asking for advice about code not yet written are off-topic. Please follow the tour and read "How do I ask a good question?", "What topics can I ask about here?" and "What types of questions should I avoid asking?".
– BCdotWEB
2 days ago




Questions asking for advice about code not yet written are off-topic. Please follow the tour and read "How do I ask a good question?", "What topics can I ask about here?" and "What types of questions should I avoid asking?".
– BCdotWEB
2 days ago




1




1




Welcome to Code Review! We review code. Where's your code?
– Mast
2 days ago




Welcome to Code Review! We review code. Where's your code?
– Mast
2 days ago












Welcome on Code Review. We do not provide code-writing services here. We recommend that you search online tutorials and examples in order for you to learn how to write your own code. See What topics can I ask about? for reference. Once you have written working code, you're welcome to ask a new question here and we can then help you improve it!
– Calak
2 days ago




Welcome on Code Review. We do not provide code-writing services here. We recommend that you search online tutorials and examples in order for you to learn how to write your own code. See What topics can I ask about? for reference. Once you have written working code, you're welcome to ask a new question here and we can then help you improve it!
– Calak
2 days ago















active

oldest

votes






















active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes

Popular posts from this blog

Ellipse (mathématiques)

Quarter-circle Tiles

Mont Emei