#!/usr/bin/env python # coding: utf-8 # # Chapter 1: Elements of a Program (Review Questions) # The questions below assume that you have read the [first ](https://nbviewer.jupyter.org/github/webartifex/intro-to-python/blob/develop/01_elements/00_content.ipynb) and the [second ](https://nbviewer.jupyter.org/github/webartifex/intro-to-python/blob/develop/01_elements/03_content.ipynb) part of Chapter 1. # # Be concise in your answers! Most questions can be answered in *one* sentence. # ## Essay Questions # **Q1**: Elaborate on how **modulo division** might be a handy operation to know! # < your answer > # **Q2**: What is a **dynamically typed** language? How does it differ from a **statically typed** language? What does that mean for Python? # < your answer > # **Q3**: Why is it useful to start counting at $0$? # < your answer > # **Q4**: What is **operator overloading**? # < your answer > # **Q5**: What are the basic **naming conventions** for variables? What happens if a name collides with one of Python's [keywords ](https://docs.python.org/3/reference/lexical_analysis.html#keywords)? # < your answer > # **Q6**: Advocates of the [functional programming ](https://en.wikipedia.org/wiki/Functional_programming) paradigm suggest not to use **mutable** data types in a program. What are the advantages of that approach? What might be a downside? # < your answer > # ## True / False Questions # Motivate your answer with *one short* sentence! # **Q7**: "**dunder**" refers to a group of Australian (i.e., "down under") geeks that work on core Python. # < your answer > # **Q8**: The **Zen of Python** talks about Indian genius programmers. # < your answer > # **Q9**: When NASA famously converted some measurements to the wrong unit and lost a Mars satellite in 1999 (cf., [source](https://www.wired.com/2010/11/1110mars-climate-observer-report/)), this is an example of a so-called **runtime error**. # < your answer > # **Q10**: [PEP 8 ](https://www.python.org/dev/peps/pep-0008/) suggests that developers use **8 spaces** per level of indentation. # < your answer >