September 2019
Beginner to intermediate
494 pages
13h
English
In the is_even() function, the print statement at the end will never be reached by a Python interpreter since the function will return beforehand. We call this piece of code (which does not affect the execution of our program in any way) dead code. In most cases, a programmer will either try to incorporate that code into the actual function somehow or simply delete it.
We will delete the line of code in this example. Watch the scroll bar on the right as you do so to see the current warning disappear.
Read now
Unlock full access