Question
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
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started