hey i would like a program to help me schedule my lectures and activities for dds. I would like to enter a date and an activity description and get as my output a text string e.g Input 03/13 work on dds assignment
Output march the 13th: work on dds assignment

You must show own effort, post your code!

def print_menu():

print '1. Add an Event'

print '2. Save Events to File'

print '3. Load Events from File'

print '4. Quit'

print

event_list = []

menu_choice = 0

print_menu()

while True:

menu_choice = input("Select Menu Item (1-4): ")

if menu_choice == 1:

print "Add Event"

date = input("Date: ")

time = raw_input("Time: ")

title = raw_input("Title: ")

desc = raw_input("Description: ")

loc = raw_input("Location: ")

attend = raw_input("Attendee(s): ")

ui = "Date: " + date, "Time: " + time, "Title: " + title, "Description: " + desc, "Location: " + loc, "Attendee(s): " + attend

event_list.append(ui)

elif menu_choice == 2:

filename = raw_input("Filename to save: ")

pickle_file = open(filename, "w")

cPickle.dump(event_list, pickle_file)

pickle_file.close()

elif menu_choice == 3:

filename = raw_input("Filename to load: ")

pickle_file = open(filename, "r")

events = cPickle.load(pickle_file)

pickle_file.close()

print "Events:", events

elif menu_choice == 4:

break

else:

print_menu()

print "Goodbye"

this 1 keeps giving me errors how do i fix it

If you would push the (CODE) button before pasting and and would not have double spaced all code, maybe we could find out. It is not only the tags as the format shown by reply to the post shows impossible indention. Funny how similar your code seems with this python-forum post.

def print_menu():

print '1. Add an Event'

print '2. Save Events to File'

print '3. Load Events from File'

print '4. Quit'

print

event_list = []

menu_choice = 0

print_menu()

while True:

menu_choice = input("Select Menu Item (1-4): ")

if menu_choice == 1:

print "Add Event"

date = input("Date: ")

time = raw_input("Time: ")

title = raw_input("Title: ")

desc = raw_input("Description: ")

loc = raw_input("Location: ")

attend = raw_input("Attendee(s): ")

ui = "Date: " + date, "Time: " + time, "Title: " + title, "Description: " + desc, "Location: " + loc, "Attendee(s): " + attend

event_list.append(ui)

elif menu_choice == 2:

filename = raw_input("Filename to save: ")

pickle_file = open(filename, "w")

cPickle.dump(event_list, pickle_file)

pickle_file.close()

elif menu_choice == 3:

filename = raw_input("Filename to load: ")

pickle_file = open(filename, "r")

events = cPickle.load(pickle_file)

pickle_file.close()

print "Events:", events

elif menu_choice == 4:

break

else:

print_menu()

print "Goodbye"

commented: double, bad indention -1
def print_menu():

print '1. Add an Event'

print '2. Save Events to File'

print '3. Load Events from File'

print '4. Quit'

print



event_list = []

menu_choice = 0

print_menu()

while True:

menu_choice = input("Select Menu Item (1-4): ")

if menu_choice == 1:

print "Add Event"

date = input("Date: ")

time = raw_input("Time: ")

title = raw_input("Title: ")

desc = raw_input("Description: ")

loc = raw_input("Location: ")

attend = raw_input("Attendee(s): ")

ui = "Date: " + date, "Time: " + time, "Title: " + title, "Description: " + desc, "Location: " + loc, "Attendee(s): " + attend

event_list.append(ui)

elif menu_choice == 2:

filename = raw_input("Filename to save: ")

pickle_file = open(filename, "w")

cPickle.dump(event_list, pickle_file)

pickle_file.close()

elif menu_choice == 3:

filename = raw_input("Filename to load: ")

pickle_file = open(filename, "r")

events = cPickle.load(pickle_file)

pickle_file.close()

print "Events:", events

elif menu_choice == 4:

break

else:

print_menu()

print "Goodbye" 
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.