Assessments
Chapter 1
- In the order of importance: functionality, correctness, and efficiency.
- An assert statement raises an error when the condition it checks for is not satisfied. As such, these statements are used in tests, where we determine whether a program computes and outputs values as it is supposed to.
- A benchmark is a small but representative use case that can be used to estimate the speed of a program. Benchmarks can be used to compare different versions of a program to see if a new implementation leads to an improvement in efficiency.
- In IPython or Jupyter notebooks, the timeit magic command, when placed in front of a code snippet, will run that code several times and record the running time of each run. The output of the command ...
Get Advanced Python Programming - Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.