If- elif - else and unreachable code (keep your Python away from this trap!)

Опубликовано: 16 Сентябрь 2023
на канале: PatchyPython
111
1

When running multiple tests over conditions that are not mutually exclusive (example water is hot - water is very hot), it's important that you do them in the right order; otherwise, some of your code may become unreachable, in the sense that no possible execution path will ever lead to those instructions. Generally, this is a sign of logical flaw in your code. For more information, see the notebooks below (notebooks will open on Google Colab - no installation required)

Embedded video, part of the following courses:
Computer Programming at Queen Mary, University of London
Jupyter notebook: https://tinyurl.com/4umjbjvp
Coding for Scientists at Queen Mary, University of London
Jupyter notebook: https://tinyurl.com/539p4b5f


Смотрите видео If- elif - else and unreachable code (keep your Python away from this trap!) онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь PatchyPython 16 Сентябрь 2023, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 111 раз и оно понравилось 1 людям.