Skip to content

Instantly share code, notes, and snippets.

@Jam6808
Jam6808 / driver.py
Created September 12, 2012 18:58
Credit organizer, asks for input and returns the based on a query
import org
import classes
#The driver for the program
def main():
print('This is a college credit organizer')
#This takes the function and calls it and sets it equal to a variable, I expect either 180 or 120 based on their schools system.
credits_need = org.CreditsNeeded()
def not_alone(nums, val):
for e in nums:
if e == val:
s = nums.index(e)
if s != 0 and s != (len(nums) - 1):
nums[s] = max(nums[s-1], nums[s+1])
return nums
Cord=[['upper_left',[-150,50]],[-50,50],[50,50],[-150,-50],[-50,-50],[50,-50],[-150,-150],[-50,-150],[50,-150]]
def get_cord(location):
for c in Cord:
if c[1] == location:
return c[2]
@Jam6808
Jam6808 / Class Scheduling
Created July 2, 2012 05:56
Class scheduling
#Asks for users class information
dept_code = input('Enter the department code: ')
course_numb = input('Enter the course number: ')
section_numb = input('Enter the section number: ')
#Checks to see if length of 3 and is numeric
def check_course(course_numb):
if len(course_numb) == 3 and course_numb.isdigit():
return
else: