Answered step by step
Verified Expert Solution
Question
1 Approved Answer
using python spyder 3.3.6 5. display_herd_immunity (fp) None: This function displays all the states whose coverage is less than 90%, the minimal value needed for
using python spyder 3.3.6
5. display_herd_immunity (fp) None: This function displays all the states whose coverage is less than 90%, the minimal value needed for measles herd immunity. Use these strings for the title and header: " States with insufficient Measles herd immunity." "{:5s}".format("State", "Percent") Format the data lines similar to the header state: string, left justified with a field width of 25 value: float, right justified with a field width of 5 and 1 decimal digit of precision Your program should ignore the lines where the values are "NA". a. Parameter: file pointer b. Returns: nothing 6. write_herd_immunity (fp) None: This function writes into a file named herd.txt all the states whose coverage is less than 90%, the minimal value needed for measles herd immunity. Specifications are exactly the same as the previous function display_herd immunity, the difference is that instead of displaying on the screen you will be writing to a file. Remember to close the file after writing to it. a. Parameter: file pointer b. Returns: nothingStep 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