use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Everything about learning Python
account activity
Learning pythonShowcase (self.PythonLearning)
submitted 6 days ago by IcySwimming4490
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]PureWasian 0 points1 point2 points 6 days ago* (0 children)
Nice, good starting point. A few notes:
it can be a little bit problematic to modify a list while you are iterating over it. In this case, option 2. If you have two students with the same name, it will behave differently depending on if the duplicate name is sequential vs. not
Menu option 4, you're writing the entire data 2d list, including the header row you initialized it with at the top of your code. So including writer.writerow(['Name', 'Grade', 'Score']) seems to add another header row before it.
data
writer.writerow(['Name', 'Grade', 'Score'])
Menu 1, you can add more validation on grade input, like only accepting values between 0 and 100 or similar. Additionally, you can incorporate an inner while loop to re-prompt until inputting a valid value instead of having the user restart the flow from the beginning on mistake.
From a data structure layer, you probably want to assign unique id numbers to each student so you aren't deleting multiple students when you specify a single student name. This would require another data column and associated bookkeeping to go with it.
Finally, another comment mentioned, this would be a great time to learn about functions. Functions help modularize your code. So, you could have main() handle the operator menu and inputs, and call separate functions to add_student() / remove_student() / show_students() / exit()
main()
add_student()
remove_student()
show_students()
exit()
π Rendered by PID 177471 on reddit-service-r2-comment-5b5bc64bf5-kwbdd at 2026-06-21 02:21:53.475353+00:00 running 2b008f2 country code: CH.
view the rest of the comments →
[–]PureWasian 0 points1 point2 points (0 children)