/
comp
/
Python
Обзор
Документация
Войти
/
comp
/
Python
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
file2
69 строк
1 KB
comp
file2
26 май 2025, 15:19
26 май 2025, 15:19
65a1160
Код
Авторство
О чём код?
#Задание 2/1 HELP = """ help - a simple command line tool for managing your tasks add - add a new task show - show all tasks""" tascks = [] run = True while run: command = input("Enter a command: ") if command == "help": print(HELP) elif command == "show": print(tascks) elif command == "add": task = input("Enter a task: ") tascks.append(task) print("Task added") elif command == "exit": print("Спасибо за использование! До свидания!") break else: print("Unknown command") run = False print("Goodbye!") #Задание 2/2 HELP = """ help - a simple command line tool for managing your tasks add - add a new task show - show all tasks""" tascks = [] today = [] tomorrow = [] other = [] run = True while run: command = input("Enter a command: ") if command == "help": print(HELP) elif command == "show": print(tascks) elif command == "add": task = input("Enter a task: ") date = input("Enter the date (Сегодня/Завтра/Другая дата): ") if date == "Сегодня": today.append(task) print("Task added to today") elif date.lower() == "завтра": tomorrow.append(task) print("Task added to tomorrow") else: other.append(task) print("Task added to other") elif command == "exit": print("Спасибо за использование! До свидания!") break else: print("Unknown command") run = False print("Goodbye!")