In this week, you have studied additional Python language syntaxincluding Lists, Sequences, Dictionaries and Sets. The Lab for thisweek demonstrates your knowledge of this additional Pythonfunctionality. Be sure to use these powerful data structures youstudied this week when creating your code.
Submission requirements for this project include multiple files.(Zipping them into one file is acceptable and encouraged):
Python State Capital and Flower List Application Code
Word or PDF file containing your test and pylint results
Flower image set – These images should be uploaded supportingthe testing of your lab.
The first exercise produces a command line menu-driven pythonapplication providing users with the ability to search and displayU.S. State Capital, population and Flowers. The second partdocuments your testing and pylint analysis results.
1. Python command line menu-driven application that allows auser to display, sort and update, as needed a List of U.S statescontaining the state capital, overall state population, and stateflower. The Internet provides multiple references with these lists.For example:https://www.crestcapital.com/tax/us_sta ... -capitals/ You willneed to embed the State data into your Python code in a datastructure of your choice, from the readings this week. The userinterface will allow the user to perform the followingfunctions:
1. Display all U.S. States in Alphabetical order along with theCapital, State Population, and Flower
2. Search for a specific state and display the appropriateCapital name, State Population, and an image of the associatedState Flower.
3. Provide a Bar graph of the top 5 populated States showingtheir overall population.
4. Update the overall state population for a specific state.
5. Exit the program
As before, generate an appropriate Welcome, prompt, and exitmessages to help the user navigate the program.
The program should continue to allow selections until theprogram is exited.
2 If a state is not found an appropriate message should bedisplayed. Hints:
1. Use the List data structure and associated sort() andsearching capabilities
2. Create and use functions as often as possible.
3. Validate input data to ensure each entry from the user iscorrect before proceeding.
4. Prompt the user to reenter information as needed.
5. The following Python sites are excellent resources forlearning more about the Python libraries mentioned in the readingsthat you should use as part of this exercise. a.https://matplotlib.org/tutorials/introd ... yplot.html b.https://matplotlib.org/tutorials/introd ... -images-py
6. Use comments to document your code
7. Test with many combinations.
8. Use pylint to verify the code style – the goal is a 10!
9. Before you import a third part library (e.g. matplotlib) )youmust install it. To install a Third Party library, you use thiscommand at the command prompt:
python -m pip install -U matplotlib 2.
Document your testing results using your programmingenvironment. You should also include and discuss your pylintresults for the application. The test document should include atest table that includes the input values, the expected results andthe actual results. A screen capture should be included that showsthe actual test results of running each test case found in the testtable. Be sure to include multiple test cases to provide fullcoverage for all code and for each function you develop andtest.
In this week, you have studied additional Python language syntax including Lists, Sequences, Dictionaries and Sets. The
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am