Python Forum
Thread Rating:
  • 1 Vote(s) - 2 Average
  • 1
  • 2
  • 3
  • 4
  • 5
If statement [Guard List]
#8
I've merged the threads together. Those of us who help out, check the whole forum, so posting multiple times doesn't really help you at all.

With these sorts of problems, it can help to write out different situations that can happen, and then take a step back and see if any patterns exist. From there, writing the actual code is almost easy, it's the ideas and structure that you need to think about.

For example, you probably don't want to type in each guard's name every time you run the script. Do you want the schedule to remain roughly the same week to week, or do you want to vary it so the same people don't work the same shifts all the time? Either way, I think the first thing you should do is create a small database (sqlite and sqlalchemy make this very easy) to keep track of the guards, and another table to keep track of their shifts.
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,735 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,289 Sep-21-2021, 02:58 AM
Last Post: bowlofred
  How to invoke a function with return statement in list comprehension? maiya 4 2,947 Jul-17-2021, 04:30 PM
Last Post: maiya
  An IF statement with a List variable dedesssse 3 8,497 Jul-08-2021, 05:58 PM
Last Post: perfringo
  using element on a list as condition statement glennford49 11 5,090 May-21-2020, 12:53 PM
Last Post: hussainmujtaba
  Help: list comprehension for loop with double if statement mart79 3 2,493 May-04-2020, 06:34 AM
Last Post: buran
  Taking brackets out of list in print statement pythonprogrammer 3 2,457 Apr-13-2020, 12:25 PM
Last Post: perfringo
  printing a list contents without brackets in a print statement paracelx 1 2,170 Feb-15-2020, 02:15 AM
Last Post: Larz60+
  Checking for an item in a list (if then statement) Sailnir 1 2,096 Jul-18-2019, 05:36 PM
Last Post: ndc85430
  skeleton class needs working instantiation guard hereathome 3 3,093 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