subject

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), high school (12), more than high school but not a college graduate >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."

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 16:10
Which is a benefit of peer-to-peer networking? easy to add or remove devices main server has a fast processor more reliable than a client/server network same software versions on all computers
Answers: 3
question
Computers and Technology, 22.06.2019 20:00
What is the worst-case complexity of the maxrepeats function? assume that the longest string in the names array is at most 25 characters wide (i.e., string comparison can be treated as o( class namecounter { private: int* counts; int nc; string* names; int nn; public: namecounter (int ncounts, int nnames); int maxrepeats() const; }; int namecounter: : maxrepeats () { int maxcount = 0; for (int i = 0; i < nc; ++i) { int count = 1; for (int j = i+1; j < nc; ++j) { if (names[i] == names[j]) ++count; } maxcount = max(count, maxcount); } return maxcount; }
Answers: 3
question
Computers and Technology, 23.06.2019 17:00
*! 20 points! *jeff wants to create a website with interactive and dynamic content. which programming language will he use? a. dhtml b. html c. css d. javascript
Answers: 1
question
Computers and Technology, 24.06.2019 00:00
Visualizing a game of “tag” to remember the meaning of contagious
Answers: 3
You know the right answer?
Write a function called proportion_of_education which returns the proportion of children in the data...
Questions
question
Mathematics, 16.01.2022 14:00
Questions on the website: 13722367