Computers and Technology

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."

answer
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 15:10, AleciaCassidy
Consider a direct-mapped cache with 216 words in main memory. the cache has 16 blocks of 8 words each. it is a word-addressable computer (rather than a byte-addressable computer which we normally discuss). (a) how many blocks of main memory are there? (b) what is the format of a memory address as seen by the cache, that is, what are the sizes of the tag, cache block, and block offset fields (if they apply)? (c) to which cache block will the memory reference db6316 map?
Answers: 1
image
Computers and Technology, 24.06.2019 02:10, trint5952
Aspeed limit sign that says "night" indicates the legal speed between sunset and sunrise.
Answers: 2
image
Computers and Technology, 24.06.2019 04:30, minecrafter3882
Fall protection, confined space entry procedures, controlled noise levels, and protection from chemical hazards are some of the things that contribute to a safe what
Answers: 1
image
Computers and Technology, 24.06.2019 07:00, Dkhaurithompson
Selective is defined as paying attention to messages that are consistent with one’s attitudes and beliefs and ignoring messages that are inconsistent.
Answers: 1
Do you know the correct answer?
Write a function called proportion_of_education which returns the proportion of children in the data...

Questions in other subjects:

Konu
Mathematics, 14.07.2019 21:30