So, I've been working on a project for my Mother. She is the Manager at a Senior Center and has tasked me with creating a Pool Class Check-In program, so that Members can come in, click their name and check in for the day. I've been working at it for a few weeks and this is what I have so far:
Here is the code:
Keep in mind this is only the CLI backbone, I am going to attempt to make a GUI for this.
from datetime import datetime import calendar def error(code): if code == 001: print "An error has occured, please restart the program and try again." def currentDate(): now = datetime.now() date = "%s/%s/%s" % (now.month, now.day, now.year) return date def currentTime(): now = datetime.now() time = "%s:%s:%s" % ((now.hour - 4), now.minute, now.second) return time def currentDay(): now = datetime.now() today = today = calendar.weekday(now.year, now.month, now.day) return today class Member(object): def __init__(self, name, monday, tuesday, wednesday, thursday, friday, checkedIn): self.name = name self.monday = monday self.tuesday = tuesday self.wednesday = wednesday self.thursday = thursday self.friday = friday self.checkedIn = checkedIn def display(self): return "%s | %s | Checked In: %s" % (self.name, currentDate(), self.checkedIn) def checkIn(self): self.checkedIn = True today = currentDay() if today == 0: self.monday = "Yes" elif today == 1: self.tuesday = "Yes" elif today == 2: self.wednesday = "Yes" elif today == 3: self.thursday = "Yes" elif today == 4: self.friday = "Yes" else: self.checkedIn = False displayRoster() def checkInData(self): print "Check-In Data for %s:" % (self.name) print "Monday: %s" % (self.monday) print "Tuesday: %s" % (self.tuesday) print "Wednesday: %s" % (self.wednesday) print "Thursday: %s" % (self.thursday) print "Friday: %s" % (self.friday) poolRoster =  def displayRoster(): for n in range(len(poolRoster)): print poolRoster[n].display() def addMember(): member = Member(raw_input("Name:"), "No", "No", "No", "No", "No", False) poolRoster.append(member)
Here it is in repl.it:
So... What do you think? Good Things? Bad Things? Any improvements I should make?