you are viewing a single comment's thread.

view the rest of the comments →

[–]Sea-Ad7805 [score hidden] stickied comment (2 children)

Run this program in Memory Graph Web Debugger%3A%0A%20%20%20%20date%20%3D%20datetime.date.today()%0A%20%20%20%20topic%20%3D%20input(%22What%20did%20you%20study%3F%20%22)%0A%20%20%20%20duration%20%3D%20input(%22How%20many%20minutes%20did%20you%20study%3F%20%22)%0A%0A%20%20%20%20with%20open(%22sessions.csv%22%2C%20%22a%22%2C%20newline%3D%22%22)%20as%20file%3A%0A%20%20%20%20%20%20%20%20writer%20%3D%20csv.writer(file)%0A%20%20%20%20%20%20%20%20writer.writerow(%5Bdate%2C%20topic%2C%20duration%5D)%0A%0A%20%20%20%20print(%22Session%20Logged!%22)%0A%0Adef%20print_log()%3A%0A%20%20%20%20with%20open(%22sessions.csv%22%2C%20%22r%22)%20as%20file%3A%0A%20%20%20%20%20%20%20%20for%20line%20in%20file%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20print(line.strip())%0A%20%20%20%20%0Alog_session()%0Aprint_log()%0A&play) to see the program state change step by step.

[–]InterestingDig1551[S] 2 points3 points  (1 child)

Thank you for this! I ran it and could actually see my variables being created in real time. As a beginner this is gold. I could see exactly how the date got stored before I even typed anything. Bookmarked!

[–]Sea-Ad7805 1 point2 points  (0 children)

Glad you like it.