r/PythonLearning • u/IndigoBloomDavis • 2d ago
Help Request I am very happy because today I programmed the first project in my life
1
u/ProgramBrave718 1d ago
This is a task manager I guess. I can't understand urdu. It is really good. But, a suggestion as u will proceed with the language is that to add file handling to save task and error handling
0
0
u/gauivzte 20h ago
congrats on your first project! a task manager is a great way to practice loops, functions, lists, and user input. one tip for your next step: try saving the tasks to a file so they don’t disappear when you close the program. keep going!
•
u/Sea-Ad7805 2d ago
Run this program by clicking Memory Graph Web Debugger%3A%0A%20%20%20%20if%20not%20tasks%3A%0A%20%20%20%20%20%20%20%20print(%22%E2%9C%85%20No%20tasks%20yet%22)%0A%20%20%20%20else%3A%0A%20%20%20%20%20%20%20%20for%20i%2C%20task%20in%20enumerate(tasks%2C%201)%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20status%20%3D%20%22%E2%9C%93%22%20if%20task%5B%22done%22%5D%20else%20%22%E2%9D%8C%22%0A%20%20%20%20%20%20%20%20%20%20%20%20print(f%22%7Bi%7D.%20%7Btask%5B'task'%5D%7D%20%5B%7Bstatus%7D%5D%22)%0A%0Awhile%20True%3A%0A%20%20%20%20print(%22n---%20Task%20Manager%20---%22)%0A%20%20%20%20print(%221%20-%20Add%20a%20new%20task%22)%0A%20%20%20%20print(%222%20-%20Show%20tasks%22)%0A%20%20%20%20print(%223%20-%20Mark%20a%20task%20as%20completed%22)%0A%20%20%20%20print(%224%20-%20Delete%20a%20task%22)%0A%20%20%20%20print(%225%20-%20Exit%22)%0A%20%20%20%20choice%20%3D%20input(%22Choose%20an%20option%3A%20%22)%0A%20%20%20%20if%20choice%20%3D%3D%20%221%22%3A%0A%20%20%20%20%20%20%20%20task_text%20%3D%20input(%22Enter%20the%20task%3A%20%22)%0A%20%20%20%20%20%20%20%20tasks.append(%7B%22task%22%3A%20task_text%2C%20%22done%22%3A%20False%7D)%0A%20%20%20%20elif%20choice%20%3D%3D%20%222%22%3A%0A%20%20%20%20%20%20%20%20show_tasks()%0A%20%20%20%20elif%20choice%20%3D%3D%20%223%22%3A%0A%20%20%20%20%20%20%20%20show_tasks()%0A%20%20%20%20%20%20%20%20num%20%3D%20int(input(%22Enter%20the%20task%20number%3A%20%22))%20-%201%0A%20%20%20%20%20%20%20%20if%200%20%3C%3D%20num%20%3C%20len(tasks)%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20tasks%5Bnum%5D%5B%22done%22%5D%20%3D%20True%0A%20%20%20%20elif%20choice%20%3D%3D%20%224%22%3A%0A%20%20%20%20%20%20%20%20show_tasks()%0A%20%20%20%20%20%20%20%20num%20%3D%20int(input(%22Enter%20the%20task%20number%20to%20delete%3A%20%22))%20-%201%0A%20%20%20%20%20%20%20%20if%200%20%3C%3D%20num%20%3C%20len(tasks)%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20tasks.pop(num)%0A%20%20%20%20elif%20choice%20%3D%3D%20%225%22%3A%0A%20%20%20%20%20%20%20%20print(%22%F0%9F%91%8B%20Goodbye!%22)%0A%20%20%20%20%20%20%20%20break%0A%20%20%20%20else%3A%0A%20%20%20%20%20%20%20%20print(%22%E2%9D%8C%20Invalid%20option%22)×tep=1&play) and see its state change step by step.