Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I need help doing this assignment in python 3.6 full solution thanks Purpose: To practice Arithmetic with arrays Degree of Difficulty: Easy In this question

I need help doing this assignment in python 3.6 full solution thanks image text in transcribed
Purpose: To practice Arithmetic with arrays Degree of Difficulty: Easy In this question you will use information from Canada Medical Association (CMA) to analyze Physician- Population ratio across all Canadian provinces from year 2013 to 2017 In year 2013 CMA planned to im- prove this ratio by 5% in every province during next five years. You can find a tabular file adq2.txt in starter folder on Moodle, with all the information that you require for this question It has 5 columns the province's abbreviated name. its population in year 2013 the number of physicians each province has in 2013, its pop- ulation in year 2017 and the number of physicians each province has in 2017 (a) Begin by opening and reading the fie aeq2.txt into Python b) To assist with analysis, you will need the data stored in arrays. Create five arrays that hold the following information the province strings, the populations in 2013 number of physicians in 2013, the population in 2017 and the number of physicians in 2017 The arrays should maintain the ordering of the file, so that the data for NL is first. followed by "PE and so forth. Test this before you move on c) Calculate the population per physician for 2013 and 2017 both. This is easily done with a numpy array calculation. All these values will be float values at this point, but we need integer values to represent this physician-population ratio. Convert these values to integers by using the method numpy. ar ound O ratio Convert these values to integers by using the method nunpy around It will retum the float rounded to the nearest integer d) Calculate the rate of improvement in physician-population ratio in each province from 2013 to 2017 [Hint Formula to find rate of improvement is Gold value. new value/old value)10 We will nowuse logical indexing to analyse ourindings Use arelationalexpression to create a array, where True indicates that the physician-population ration has been increased by at least 5% and False if it is not ) Also create a boolean array that checks f the rate of improvement in physician-population ration is equal to or less than zero for each province. Your results should indicate that all of the provinces except Ontario have improved their ratio g Finally we need to report our findings by printing the information to the console. Display the ratios for both year as well as the rate of improvement as shown below Sample Run Here is an example execution of the required program. The formatting of your program's output should be similar to this example nN population per physidian 4042013 and 530 2017 Based on these ratio, the rate of improvement is 12.74% in PE population per physician was 559 in 2013 and 524 in 2017 Based on these ratio, the rate of improvement 6,24% In NS population per physician was 384 in 2013 and 379 in 2017 Based on these ratio, the rate of improvement is 127% in NB population per physician was 437 in 2013 and 430 in 2017 Based on these ratio the rate of improvement is 1 50x In 08 population per physician was 418 in 2013 and 414 in 2017 Based on these ratio, the rate of improvement is 085% n ON population per physician was 468 in 2013 and 475 in 2017 Based on these ratio, the rate of improvement is 44% In MB population per physician was 497 in 2013 and 468 in 2017 Based on these ratio the rate of improvement is 589% In SK population per physician was 528 in 2013 and 488 in 2017 Based on these ratio, the rate of improvement is 765% In AB population per physician was 437 in 2013 and 433 in 2017

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Oracle Database Foundations Technology Fundamentals For IT Success

Authors: Bob Bryla

1st Edition

0782143725, 9780782143720

More Books

Students also viewed these Databases questions

Question

1. Does your voice project confidence? Authority?

Answered: 1 week ago