**** Use Pyhton Code Only ****** This program will import an input file that wil
ID: 3574610 • Letter: #
Question
**** Use Pyhton Code Only ******
This program will import an input file that will have information on any number of families. The information will consist of
ID#, Number of family members, yearly income, and state of residence.
You do not know the number of families on the file being imported. Data in the input file will look like this (representing their ID, number of members, income and state).
3489 4 45000 WA
The graphic window you present to the user will allow them to choose what reports to generate.
Report 1 - Write out to a file all the families that fall below the poverty level (see Poverty Guidelines below).
Report 2 - Display in the window all the families that are above the average income.
Report 3 - Display in the window the % of families that fall below the poverty level.
When you import the data from the input file you will need to put the data into lists and then place those lists into a master list. That master list will hold all the data from the original input file (and more). When processing any data for the above reports you need to pull it from the master list not from the other lists or the input file. There will be five buttons. One to import the input file and the others to generate the 3 reports and an exit button. Use functions for this homework.
Here is the input file. For the purposes of your code you can anticipate that any input file you will process will not have more than 15 entries and that for Report 2, in the window, the families that fall above the average income will not exceed 10. None of the interaction with the user should take place in the Python Shell.
3489 2 32500 WA
3490 5 23000 AK
3491 4 38210 HI
3492 2 38000 AK
3493 1 26000 MT
3494 3 16400 HI
3495 4 25000 CA
3496 14 20500 FL
3497 2 18000 HI
3498 3 19700 WA
3499 8 30000 VA
3500 5 23400 OR
3501 2 119700 VA
3502 3 13000 PA
Explanation / Answer
main.py
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.