Scenario 10

Code Solution

The highlighted portions below illustrate the areas where corrections are required in order to make this program run and generate results.
data work.mycars;
   set sashelp.cars;
   AvgMPG=mean(mpg_city, mpg_highway);
run;
title 'Cars With Average MPG Over 40';
proc print data=work.mycars;
   var make model type avgmpg;
   where AvgMPG>40;
run;
title 'Average MPG by Car Type';
proc means data=work.mycars mean min max maxdec=1;
   var avgmpg;
   class type;
run;
title;

Test Your Code Solution

  1. Correct Answer: 262
  2. Correct Answer: 4
Last updated: February 14, 2019
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset