Код: Выделить всё
if isConcurrentAppointment(date, startTime, endTime):
print("Concurrent appointment exists. Try again.")
continue
Код: Выделить всё
if ConcurrentAppointment(date, startTime, endTime):
print("Concurrent appointment exists. Try again.")
continue
Код: Выделить всё
def addRecord():
while True:
date = inputDate()
startTime = inputTime("start")
endTime = inputTime("end")
subject = input("Enter an appointment title: ")
schedule.append(appointment)
print("Appointment saved")
Код: Выделить всё
def addRecord():
while True:
date = inputDate()
startTime = inputTime("start")
endTime = inputTime("end")
if isConcurrentAppointment(date, startTime, endTime):
print("Concurrent appointment exists. Try again.")
continue
subject = input("Enter an appointment title: ")
schedule.append(appointment)
print("Appointment saved")
Код: Выделить всё
def addRecord():
while True:
date = inputDate()
startTime = inputTime("start")
endTime = inputTime("end")
if ConcurrentAppointment(date, startTime, endTime):
print("Concurrent appointment exists. Try again.")
continue
subject = input("Enter an appointment title: ")
schedule.append(appointment)
print("Appointment saved")
Синтаксическая ошибка: 'продолжить' неправильно в цикле
Я нашел это в другом посте — можно ли каким-то образом включить его в приведенный выше код, чтобы остановить одновременные встречи?
Код: Выделить всё
a.start < b.end and a.end > b.start
Подробнее здесь: https://stackoverflow.com/questions/781 ... to-my-code