Day 035 - Project 35 : To-Do List Manager Redux

If you have any questions, comments or issues with this project please post them here!

hi
ı want to ask about 035 day

project 's edit option. I watched the solution and david easly wrote ##if list[i] == new list[i] = new ##
and then change “i” with “new” but when ı try to do it . it is not working . my solution is using the append and remove the item with new one
what is my wrong?

Could you send your code?

import os, time

counter = 0
counter1 = 0
counter2 = 0
list = [‘yoğurt yenecek’, ‘karpuz kesilecek’, ‘tolga’]

print()

print()
while True:
print(" welcome to \033[33m- TO DO LİST MANAGER-\033[31m")
print()
print()
print(
“\033[31mdo you want to view,add,remove or edit ___ the to-do list___”
.upper())

a = str(input(“:”))

if a == “add”:
print(“write text to “)
b = input(“add the todo list”)
if b not in list:
list.append(b)
print(“adding new duty”)
time.sleep(0.5)
print(”.”)
time.sleep(1)
print(“…”)
time.sleep(2)
print(“…”)

  os.system("clear")
  continue
  print()
  print()
else:
  print(f"you also have {b} duty")
  print("returning main menu")
  time.sleep(0.5)
  print(".")
  time.sleep(1)
  print("...")
  time.sleep(2)
  print(".....")
  os.system("clear")
  continue

elif a == “view”:
counter = 0
for i in list:
counter += 1
print(f"\033[37m{counter}.duty —\033[36m{i}\033[31m")
time.sleep(0.5)

continue

elif a == “remove”:
print(“\033[31mchoise for remove”)
for i in list:
counter1 += 1
print(f"\033[37m{counter1}.duty —\033[36m{i}\033[30m")
time.sleep(1)
b = int(input(“\033[31mwhich duty do you want to remove ?:”))
print(
f"\033[31mAre you sure for removing (Y-N)\033[37m {list[b-1]} \033[30m")
c = input(“”)
if c == “y”:
list.remove(list[b - 1])
print(f"\033[31m-------current to do list-------\n{list}")

  counter1 = 0
  print()
  print()
  print("Returning main menu")
  print(".")
  time.sleep(1)
  print("...")
  time.sleep(2)
  print(".....")
  os.system("clear")
elif c == "n":
  print("Returning main menu")
  time.sleep(0.5)
  print(".")
  time.sleep(1)
  print("...")
  time.sleep(2)
  print(".....")

  os.system("clear")
  continue

######################################## **
** elif a == “edit”:

** print()**
** counter2 = 0**
** for i in range(0, len(list)):**
** counter2 += 1**
** print(f"\033[37m{counter2}.duty —\033[36m{list[i]}\033[30m")**
** time.sleep(1)**
** b = input(“which duty do you want to edit?:”)**
** new = input(“new item:”)**
** for i in range(0,len(list)):**
** print(list[i])**
** if list[i] == new:**
** # david solition**
** #list.append(new)**
** #list.remove(b)**
** list[i] = new**

** print(f"recent list\n-------")**
** print(list)**

as you can see ı used ### sign at problem part ,

My to do list organizer from Day 35

https://replit.com/@JackAdem/Day-035-Project-35-To-Do-List-Manager-Redux?v=1

#Replit100DaysOfCode #100DaysOfCode.

1 Like