Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

A survey has been conducted to investigate the relationship between the average marks of high school students and their time spent on electronic entertainment (Television

image text in transcribedimage text in transcribed

A survey has been conducted to investigate the relationship between the average marks of high school students and their time spent on electronic entertainment (Television and e-gaming). Import data from screendata.txt and answer the following questions. Give answers as either integers (where appropriate) or to 4 decimal places (as printed by Matlab). (a) What is the average combined screentime (TV + gaming) for all students? (b) Find the number of students who are above the average screentime (c) Find the ID number of the student with the highest marks (d) Healthy lifestyle awards will be given to students who have total screen time of less than 4 hours per day, and average marks of over 80%. Determine how many students will receive this award Write a function called "screentime" that, when given the file handle as input, will calculate and print each of the answers above, and then print the information of all students receiving this award for the awards committee to view. The function does not need to have any output variables, just print the values to the screen using fprintf. A sample output of the file might look like the following (italics just for emphasis): Answers (a) 3.6243 (b) 113 (c) 1104 (d) 56 Student 504, screen time = 2 hours, marks = 93.4% Student 1253, screen time = 1.5 hours, marks = 87.1% etc

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

Step: 3

blur-text-image

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

Computer Aided Database Design

Authors: Antonio Albano, Valeria De Antonellis, A. Di Leva

1st Edition

0444877355, 978-0444877352

More Books

Students also viewed these Databases questions