September 2019
Beginner to intermediate
494 pages
13h
English
In this section, we will be considering a number of specific instances where PyCharm's code analyzer points out common errors and warnings in Python programs. We will then address these problems accordingly.
To follow this example, import the Chapter04/Inspection project into your workspace and open the main.py file, or copy and paste the following code into a PyCharm project:
def is_even(x): if x % 2 == 0: return True else: return False print('Function finished.')def foo(bar): return 0def main(): print(math.sqrt(4))if __name__ == '__main__': main()
The first thing to note here is that there are several errors and warnings that we need to address in this file, as indicated in the top-right corner and ...
Read now
Unlock full access