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

Published: 16 September 2023
on channel: 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


Watch video If- elif - else and unreachable code (keep your Python away from this trap!) online without registration, duration hours minute second in high quality. This video was added by user PatchyPython 16 September 2023, don't forget to share it with your friends and acquaintances, it has been viewed on our site 111 once and liked it 1 people.