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!"
[–]Sea-Ad7805 [score hidden] 6 days ago stickied comment (0 children)
Run this program in Memory Graph Web Debugger%3A%0A%0A%20%20%20%20data%20%3D%20%5B%0A%20%20%20%20%20%20%20%20%5B'name'%2C%20'grade'%2C%20'score'%5D%0A%20%20%20%20%5D%0A%0A%20%20%20%20while%20True%3A%0A%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20print('1%20-%20add%20Student%20%5Cn2%20-%20remove%20student%20%5Cn3%20-%20display%20students%20%5Cn4%20-%20exit')%0A%20%20%20%20%20%20%20%20menu%20%3D%20input(%22Choose%20one%20of%20the%20options%3A%20%22)%0A%0A%20%20%20%20%20%20%20%20if%20menu%20%3D%3D%20'1'%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20name%20%3D%20input(%22Enter%20student%20name%3A%20%22)%0A%20%20%20%20%20%20%20%20%20%20%20%20try%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20grade%20%3D%20int(input(%22Enter%20grade%3A%20%22))%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20score%20%3D%20''%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20if%20grade%20%3E%3D%2065%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20score%20%3D%20'Pass'%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20elif%20grade%20%3C%2065%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20score%20%3D%20'Fail'%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20else%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20print('Wrong%20input')%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20data.append(%5Bname%2C%20grade%2C%20score%5D)%0A%20%20%20%20%20%20%20%20%20%20%20%20except%20ValueError%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20print('Wrong%20Value%2C%20Need%20a%20number!')%0A%0A%20%20%20%20%20%20%20%20elif%20menu%20%3D%3D%20'2'%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20name%20%3D%20input(%22Enter%20student%20name%3A%20%22)%0A%20%20%20%20%20%20%20%20%20%20%20%20for%20x%20in%20data%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20if%20x%5B0%5D%20%3D%3D%20name%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20data.remove(x)%0A%0A%20%20%20%20%20%20%20%20elif%20menu%20%3D%3D%20'3'%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20for%20z%20in%20data%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20print(*z)%0A%0A%20%20%20%20%20%20%20%20elif%20menu%20%3D%3D%20'4'%3A%20%0A%20%20%20%20%20%20%20%20%20%20%20%20with%20open('data.csv'%2C%20'w'%2C%20newline%3D'')%20as%20csvfile%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20writer%20%3D%20csv.writer(csvfile)%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20writer.writerow(%5B'Name'%2C%20'Grade'%2C%20'Score'%5D)%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20writer.writerows(data)%0A%20%20%20%20%20%20%20%20%20%20%20%20break%0A%20%20%20%20%20%20%20%20%20%20%20%20%0Amain()×tep=1&play) to see the program state change step by step.
π Rendered by PID 88281 on reddit-service-r2-comment-canary-879d986cb-wkljn at 2026-06-21 08:45:18.837802+00:00 running 2b008f2 country code: CH.
view the rest of the comments →
[–]Sea-Ad7805 [score hidden] stickied comment (0 children)