r/learnpython • u/External-Cap-4877 • 4d 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.
4
u/ninhaomah 4d ago
"how to make a project its like they threw us in the sea and told us learn to swim"
You got to stop this mindset of can only do if taught from now on.
What degree are you in btw ?
3
u/baubleglue 4d ago edited 4d 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) ...
2
u/dariusbiggs 4d ago
Your problem description is not very clear, but all computer programs are built bh cutting the big problem into smaller problems until you have a list of tasks.
So you said a Lost and Found system.
You did not say much about the type of program (how a user interacts with it), but let's keep it simple and pick the report functionality.
Once you have answers the answers, repeat the process, break what you know down into smaller bits.
They are unlikely to give you a project that you have not been taught the skills for, so you either didn't pay attention, or are too hyper-focused on the wrong thing. Start with what you know. Talk to your team and ask them for help to get you started.
You don't need AI for this, use it to help you find the information on what you want to do with questions like "how do i bootstrap a Python program", and "what Python documention tells me how can i read a CSV file into a data structure i can search", "what Python documentation tells me how do i would add a line to a CSV file". Read the answers, read the documentation, learn.
Good luck.
5
u/sweet-tom 4d ago
Look for tutorial for beginners, in the channel here or use your favorite search engine. Read a few. Avoid AI.
Open the a Python module documentation, start your editor, write some basic functions, save it, and execute it by Python. See the results. If there are syntax errors, read the message carefully and try to fix them.
Rinse and repeat.
If you encountered many errors and fixed them, that's were the learning happens.
Good luck! 🍀
1
u/EyesOfTheConcord 4d ago
What do you know about coding in general? Have you written functions, modules, and are you familiar with importing and exporting?
3
u/Correct_Rain_9438 4d ago
For the file handling part, the easiest route is saving your lost and found items as a list of dictionaries with the json module. json.dump writes it to a file and json.load reads it back, so the search and match part can just loop over normal Python data.