Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1. Write a program that calculates the percentage of school districts that provide free full time or part-time preschool. Data from the Department of Education

1. Write a program that calculates the percentage of school districts that provide free full time or part-time preschool. Data from the Department of Education Civil Rights Data Collection, 2013-14, includes information on free preschool availability. Each line in the file preschool.txt contains data from a different school district. The file contains two data values per line. The first value in each line of the file is for full time preschool and the second value is for part time preschool. The data in either column can be:

YES The service is provided

NO The service is not provided

something else It is unknown if the service is provided

Your program must calculate the percentage of school districts that provide free full time preschool and the percentage that provide free part time preschool. The percentages should be based on the number of YES values divided by the total of YES and NO values. Any other value must be ignored.

Example output:

Full time preschool at 39.2867 %

Part time preschool at 59.3264 %

2. Write a function called hms_to_secs() that takes three int valuesfor hours, minutes, and secondsas arguments, and returns the equivalent time in seconds (type long). Create a program that exercises this function by repeatedly obtaining a time value in hours, minutes, and seconds from the user (format 12:59:59), calling the function, and displaying the value of seconds it returns.

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_2

Step: 3

blur-text-image_3

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

Advanced Database Systems

Authors: Carlo Zaniolo, Stefano Ceri, Christos Faloutsos, Richard T. Snodgrass, V.S. Subrahmanian, Roberto Zicari

1st Edition

155860443X, 978-1558604438

More Books

Students also viewed these Databases questions

Question

How would you assess the value of an approach like this?

Answered: 1 week ago

Question

When would you use one approach, and when would you use another?

Answered: 1 week ago

Question

3. How would this philosophy fit in your organization?

Answered: 1 week ago