Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Seemapatel.24 #1469

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions data.json
Original file line number Diff line number Diff line change
Expand Up @@ -2086,6 +2086,16 @@
],
"description": "An extension framework to Legerity for speeding up the development of automated UI tests for Uno Platform applications with Appium/Selenium on .NET."
},
{
"name": "seemapatl",
"link": " https://github.com/seemaPatl/awesome-for-beginners/pull/new/seemapatel.24",
"label": "contribution-starter",
"technologies": [
"Python"
],
"description": "A simple to do list maintainer"
}
,
{
"name": "Exosphere",
"link": "https://gitlab.com/exosphere/exosphere/-/issues/?label_name[]=Good%20First%20Issue",
Expand Down
44 changes: 44 additions & 0 deletions python/todolist.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
def main():
tasks = []

while True:
print("\n===== To-Do List =====")
print("1. Add Task")
print("2. Show Tasks")
print("3. Mark Task as Done")
print("4. Exit")

choice = input("Enter your choice: ")

if choice == '1':
print()
n_tasks = int(input("How may task you want to add: "))

for i in range(n_tasks):
task = input("Enter the task: ")
tasks.append({"task": task, "done": False})
print("Task added!")

elif choice == '2':
print("\nTasks:")
for index, task in enumerate(tasks):
status = "Done" if task["done"] else "Not Done"
print(f"{index + 1}. {task['task']} - {status}")

elif choice == '3':
task_index = int(input("Enter the task number to mark as done: ")) - 1
if 0 <= task_index < len(tasks):
tasks[task_index]["done"] = True
print("Task marked as done!")
else:
print("Invalid task number.")

elif choice == '4':
print("Exiting the To-Do List.")
break

else:
print("Invalid choice. Please try again.")

if __name__ == "__main__":
main()
Loading