Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

coursera Help jupyter assignment2 Last Checkpoint. 09/16/2020 (autosaved) View Insert Cell Kernel Widgets Help Not Trusted Python 30 Run C Markdown Validate Submit Assignment TUNUMS

image text in transcribed

coursera Help jupyter assignment2 Last Checkpoint. 09/16/2020 (autosaved) View Insert Cell Kernel Widgets Help Not Trusted Python 30 Run C Markdown Validate Submit Assignment TUNUMS Senyu UE IURE AL LUI did UIT HUNAUDIES HOME CUV. Tuul udlane IUI UNS ASSIMIS I SENTUL ILUSY. Udd guide for this, which you'll need to map the variables in the data to the questions being asked, is available at assets/NIS-PUF17-DUG. pdf. Note: you may have to go to your Jupyter tree (click on the Coursera image) and navigate to the assignment 2 assets folder to see this PDF file). File Edit . Question 1 Write a function called proportion_of_education which returns the proportion of children in the dataset who had a mother with the education levels equal to less than high school (12) and college degree. This function should return a dictionary in the form of (use the correct numbers, do not round numbers): {"less than high school":0.2, "high school":0.4, "more than high school but not college":0.2, "college":0.2} In [ ]: def proportion_of_education(): # your code goes here # YOUR CODE HERE raise Not ImplementedError() In [ ]: assert type (proportion_of_education () ==type({}), "You must return a dictionary." assert len(proportion_of_education () == 4, "You have not returned a dictionary with four items in it." assert "less than high school" in proportion_of_education().keys(), "You have not returned a dictionary with the correct keys." assert "high school" in proportion_of_education().keys(), "You have not returned a dictionary with the correct keys." assert "more than high school but not college" in proportion_of_education().keys(), "You have not returned a dictionary with the assert "college" in proportion_of_education().keys(), "You have not returned a dictionary with the correct keys." Question 2 Let's explore the relationship between being fed breastmilk as a child and getting a seasonal influenza vaccine from a healthcare provider. Return a tuple of the average number of influenza vaccines for those children we know received breastmilk as a child and those who know did not This function should return a tuple in the form (use the correct numbers: (2.5, 0.1) In [ ]: def average_influenza_doses(): # YOUR CODE HERE raise Not ImplementedError() In [ ]: assert len(average_influenza_doses())--2, "Return two values in a tuple, the first for yes and the second for no

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

Students also viewed these Databases questions