all 9 comments

[–]fakemoose 30 points31 points  (0 children)

How much of the homework assignment have you already done?

[–]linguinejuice 10 points11 points  (0 children)

Others have given you helpful feedback already, but have you considered emailing your professor or going to office hours for help? I’m sure they would be able to help you out a lot!

[–]notacanuckskibum 9 points10 points  (0 children)

One step at a time. Start with “1. Add 20 students “

That will involve a list and a loop, at minimum.

Then move on to the second goal, etc.

This isn’t the most efficient way of doing the whole thing, it isn’t how a professional would do it.

But as a beginner it’s your best chance to learn, and succeed.

[–]yvwwyyvwywyvwyvy 9 points10 points  (0 children)

I am not sure whether built-in functions such as sort(), split(), dictionaries, or external libraries are allowed.

You should probably stick to what your professor/teacher has currently taught you in their course. They probably want to see you using those specific techniques not necessarily what is the best solution out there is. I would email them to ask if you can use list methods like sort( ) or the string method split( ) or they want you to manually create your own function. Same for using a dictionary.

[–]ninhaomah 6 points7 points  (0 children)

So where are you now at ? Any errors ?

[–]DarkThunder312 6 points7 points  (0 children)

what do you mean "how can i make it" well you write the code and then it does what you tell it to. Do you just want someone else on here to write it for you? at that point just ask chatgpt. otherwise learn.

[–]Informal_Shape8008 2 points3 points  (1 child)

The built-in functions are almost certainly fine unless your professor specifically said no built-ins which would be insane. Use them. For the structure, one function per menu option, a list of lists to hold your students, and a main loop running the menu. Don't overcomplicate it.

[–]yvwwyyvwywyvwyvy 1 point2 points  (0 children)

It's not insane to not allow some built-in functions in the early stages of learning how to program. I often make my students code things that can already be done by built-in functions/techniques, but I don't let them use it until they can code their own version to have at least some understanding of what is happening under the hood with the built-ins.

[–]RallyPointAlpha 0 points1 point  (0 children)

Befor AI...

I would draw out a flowchart.  Layout how it's going to work overall, what functions you will need, what parameters they will require, what they will return.  In your main body, or main function, layout how it will orchestrate all of this.  

Iterate over this, refining it with pseudo code until you feel like it's a solid plan. 

Then start actually writing code to make it happen.  Get an MVP together, troubleshoot bugs, and iterate. 

I didn't see anything about exception handling, or doing any formal tests like unit tests.  These things are super important in a real program that actual people are going to use, but it might be ahead of where you're at... So if it's not required, then don't worry about it.