The first exercise produces a command line menu-driven python application providing users with the ability to perform several math and security related functions. The second part documents your testing and pylint analysis results.
1. (80 points) Create a menu-driven python application with following menu options for users to run at the command line:
a. Generate Secure Password
b. Calculate and Format a Percentage
c. How many days from today until July 4, 2025?
d. Use the Law of Cosines to calculate the leg of a triangle. e. Calculate the volume of a Right Circular Cylinder f. Exit program As you put this menu together be sure to adhere to the following guidance and hints:
1. Create functions to be called sending in the parameters the user enters.
2. Validate input data to ensure each entry from the user is correct before proceeding.
3. Prompt the user to reenter information as needed.
4. The following Python sites are excellent resources for learning more about the string, datetime, secrets, math, and random number libraries mentioned in the readings that you should use as part of this exercise.
5. Use comments to document your code
6. Test with many combinations.
7. Use pylint to verify the code style – the goal is a 10!
Some additional guidance related to your functions created: 2
1. For the secure Password, you should prompt the user for the length of the password to be created, as well as the complexity (i.e. Use of Upper Case, Use of Lower Case, Use of Numbers,
Use of special characters). Check out options from commercial password generators such as Norton. (https://my.norton.com/extspa/passwordmanager?path=pwd-gen). Note in a command line interface, the input and prompts are just text, so you won’t be creating a GUI, just the functionality that allows the user to enter the information needed.
2. For the percentage, consider a simple example, where the user has to enter the numerator and denominator and the number of decimal points for formatting. For example, 22, 57, 3 would yield 38.596 percent.
3. For days until July 4, 2025 the output should just be the number of days. There would be no input other than the selection from the menu
4. The formula for the law of cosines can be found at sites such as https://www.mathsisfun.com/algebra/trig-cosine-law.html. You want to solve for c (lower case c) in the following diagram.
5. The formula for a right cylinder can be found here: https://www.mathsisfun.com/geometry/prism-vs-cylinder.html. Be sure to select right circular cylinder.
6. When exiting the program be sure to thank the user for visiting your application.
2. (20 points) Document your testing results using your programming environment. You should also include and discuss your pylint results for the application. The test document should include a test table that includes the input values, the expected results and the actual results. A screen capture should be included that shows the actual test results of running each test case found in the test table. Be sure to include multiple test cases to provide full coverage for all code and for each function you develop and test.
Any submissions that do not represent work originating from the student will be submitted to the
Dean’s office and evaluated for possible academic integrity violations and sanctions.