Question
Write a function named internet_histogram that takes no parameters and does not return a value. There will be a file named survey.csv in the testing
Write a function named "internet_histogram" that takes no parameters and does not return a value. There will be a file named "survey.csv" in the testing environment containing survey results as described above (the file has a header line which much be addressed by your code). Write a new file named "histogram.csv" containing 2 columns representing "internet_use,frequency" and no header line that will contain a histogram of the results of responders ages 33 to 56 including the endpoint ages. Your file will have exactly 6 lines with internet_use values of 1-5 corresponding to the intfreq results and 6 for responders who answered 2 to eminuse. Read the survey results file and track how many responders in this age range answered with each of these 6 options and write these counts to your "histogram.csv" file in order of internet_use starting with 1. Example histogram.csv: 1,5 2,7 3,0 4,1 5,2 6,4
This is need write in Python way.
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