Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Use Docstrings For each of your functions from now on , write a brief function docstring. Docstrings, like all comments, should be written in the
Use Docstrings
For each of your functions from now on write a brief function docstring.
Docstrings, like all comments, should be written in the imperative mood, eg "Print" not "Prints".
Here's a good example docstring for a function that checks to see if a password is valid:"""Determine if password is considered valid or not.""" return False
Example
Download and study the sample code and provided comments here: menuwithfunctions.py
This example shows a familiar program our number guessing game using a menu and functions.
Use this example as a reference for writing your assignment and other code.
It demonstrates good function design, parameter passing, pseudocode for functions, docstrings...
Things to do
Add one more menu and function, so the user can choose Display to display all of the numbers
between and high
Use a function to do this. You know the function needs parameters passed in
If the low and high are and the function should print:
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started