r/learnpython • u/External-Cap-4877 • 8d ago
Final project
Hi, so i have a final project in uni so im first year student and we take python on semester 1 and the prof made us choose whatever it just need to be in python only and each oneh as 5 functions
so me and my team picked lost and found system which we didnt know anything about it
so its includes a report a lost item part and report a found item part and search and match part and the file handling
i swear this stuff is harder than it seemed we dont take in uni how to make a project its like they threw us in the sea and told us learn to swim
and now i feel so overwhelmed there is alot of stuff that idek how to do
starting from how do we even start to how to work together and how does the program should look like
so i asked ai to give me a sample of what my part should look like which is the file handling and the search and match it gave some complicated stuff that i cant even understand and the project should be done in 4 weeks maybe less
so i wanted to ask how do i do the project without ai and actually understand what the actuall fuck is going on.
View all comments
3
u/baubleglue 8d ago edited 8d ago
I see 3 items, not 5
you need to define
If you know Python basics, you probably know about dictionaries, lists, maybe even classes. Read about JSON format if you don't know what it is. (it is basically conversion of Python data types into text and vice versa. You can use pickle exactly the same way, but is a but harder to read for human.
understand how
json.dumpsandjson.loadswork (you may usejson.dump and json.load).implement functionsdef save_item_collection_to_file(file_path, I see 3 items, not 5
report a lost item
report a found item
search and match
you need to define
If you know Python basics, you probably know about dictionaries, lists, maybe even classes. Read about JSON format if you don't know what it is. (it is basically conversion of Python data types into text and vice versa. You can use pickle exactly the same way, but is a but harder to read for human.
json.dumpsandjson.loadswork.def menu_ask_to_choose_activity(): ## register found item, register lost item, register returned item, exit ... return activity
def get_from_user_lost_item_details(): ...
CHOICES = {1: "register found item", 2: "register lost item", 3: "register returned item", 4: "exist"} EXIST = False while not EXIST: choice = menu_ask_to_choose_activity() if choice == 4: save_item_collection_to_file(LOST_ITEMS_FILE_PATH, LOST_ITEMS_LIST) save_item_collection_to_file(FOUND_ITEMS_FILE_PATH, FOUND_ITEMS_LIST) EXIST = True elif choice == 2: item_name, item_description, contact_info, lost_date = get_from_user_lost_item_details() lost_item = make_new_lost_item(item_name, item_description, contact_info, lost_date=None) ...