"""function_example_2.py An example of a function with docstrings for the file and its functions. docstrings like this one are the standard python way of describing what a python function or file file (also called a "package" or a "library") does, that is, its API. docstrings (i.e. "documentation strings") tell someone who wants to use a function how to use it: what inputs are expected, and what outputs are produced. It's written for a user of the function. A docstring should not usually detail how a function is implemented - that information properly goes into comments within the function. It's written for someone who might need to edit the function's code Quick quiz : What are the (a) inputs, (b) outputs, and (c) side effects for the functions triple and main ? Things to try : $ python >>> from function_example_2 import * Type a number: 3 Three times 3 is 9. >>> help(triple) >>> dir(triple) >>> triple.__doc__ Jim Mahoney | cs.bennington.college | September 2020 | MIT License """ def triple(x): """ Return three times x. """ y = 3 * x return y def main(): """ Ask for a number, triple it, print the result. """ value = eval(input("Type a number: ")) answer = triple(value) print(f"Three times {value} is {answer}.") main()