Python Forum
Thread Rating:
  • 1 Vote(s) - 2 Average
  • 1
  • 2
  • 3
  • 4
  • 5
If statement [Guard List]
#4
Hello everyone.
i am a soldier and in my unit our job is to guard around the base 24/7.
now we have a hugh problem which its falling on one man to make a list that contain who guards where because there is 2 guarding towers and that specific man always make a list of who guards where and when because you have a minimum distance between one guard to job to another.
now what i am trying to make is a program which do it automatic.
i need your help to show me the way and bright my eyes on how to do it.
now there is a few condition for that program about the guards :
1)the distance btw a guard watch to the next guard watch needs to be around (amount of people * 3) of course its + -
the time of guard watch is 3 hours so thats way * 3.
2)if a guy did a night watch which there is 4 every day 2 at each guard watch, means that tomorrow he wont do a night watch and will doo one at the day or evening,means the program have to calculate who did last night a night watch and give him a hour not in the night.
the guard times are:(00:00-03:00,03:00-06:00,06:00-09:00,09:00-12,12-15,15-18,18-21,21-00.....)
now a friend told me to try doing it with recursive but didnt figured out how.
thank you for your help:)
Reply


Messages In This Thread
If statement - by yuvalsaias - Mar-22-2017, 01:54 PM
RE: If statement - by buran - Mar-22-2017, 02:09 PM
RE: If statement - by sparkz_alot - Mar-22-2017, 02:18 PM
RE: If statement [Guard List] - by nilamo - Apr-17-2017, 04:19 PM
Need Help with a program - by yuvalsaias - Apr-17-2017, 11:08 AM
RE: Need Help with a program - by sparkz_alot - Apr-17-2017, 12:55 PM
RE: Need Help with a program - by Mekire - Apr-17-2017, 01:46 PM
RE: Need Help with a program - by yuvalsaias - Apr-17-2017, 02:26 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  List Creation and Position of Continue Statement In Regular Expression Code new_coder_231013 3 1,741 Jun-15-2022, 12:00 PM
Last Post: new_coder_231013
  Change a list to integer so I can use IF statement buckssg 3 2,297 Sep-21-2021, 02:58 AM
Last Post: bowlofred
  How to invoke a function with return statement in list comprehension? maiya 4 2,951 Jul-17-2021, 04:30 PM
Last Post: maiya
  An IF statement with a List variable dedesssse 3 8,538 Jul-08-2021, 05:58 PM
Last Post: perfringo
  using element on a list as condition statement glennford49 11 5,102 May-21-2020, 12:53 PM
Last Post: hussainmujtaba
  Help: list comprehension for loop with double if statement mart79 3 2,500 May-04-2020, 06:34 AM
Last Post: buran
  Taking brackets out of list in print statement pythonprogrammer 3 2,464 Apr-13-2020, 12:25 PM
Last Post: perfringo
  printing a list contents without brackets in a print statement paracelx 1 2,175 Feb-15-2020, 02:15 AM
Last Post: Larz60+
  Checking for an item in a list (if then statement) Sailnir 1 2,104 Jul-18-2019, 05:36 PM
Last Post: ndc85430
  skeleton class needs working instantiation guard hereathome 3 3,095 Dec-10-2017, 03:35 PM
Last Post: hshivaraj

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020