# a01 - CS 135 Winter 2012 Brad Lushman Assignment 1 Due...

This preview shows pages 1–3. Sign up to view the full content.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
2. Translate the following function definitions into Scheme. Place your solutions in the file functions.rkt . (a) An example from statistics ( logit ): logit ( p ) = log p 1 - p (b) An example from analysis ( Stirling’s approximation ): Stirling ( n ) = 2 πn n e n (c) An example from physics ( ballistic motion ): height ( v, t ) = v · t - 1 2 · g · t 2 where g is the constant 9 . 8 (acceleration due to gravity) 3. Fuel efficiency of motor vehicles in the United States is typically measured in miles per gallon (mpg), i.e. the number of miles a vehicle can travel on a gallon of gasoline. In Canada, where most quantities are measured in metric units, fuel efficiency of motor vehicles is given in litres per hundred kilometres (L/100km), i.e. the number of litres of gasoline required for the vehicle to travel 100km. In this question, you will write a function to convert fuel efficiency from US to Canadian units. Write the function mpg - > L/100km that consumes a US fuel efficiency (measured in mpg) and produces the equivalent Canadian fuel efficiency (measured in L/100km).
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern