CPSC 115L: Introduction to Computing Fall 2010

Exam 1 review sheet

Exam 1 will be given on Wednesday, October 13, for CPSC 115-01 and Thursday, October 14, for CPSC 115-02, both in class. It will be a closed-book exam, and no calculator will be allowed. The exam will cover all of the lectures given prior to the exam, reading assignments (Chapters 1–6), Laboratories 1–5, Homework 1–4, and Quizzes 1, 2.

A list of particularly important topics Suggested practice exercises from the text Additional exercises
  1. Alyssa's Coffee pays employees time-and-a-half for any hours worked above 40 in a given week. Design and implement a Python script that prompts the user for hours worked and an hourly wage and then computes the total wages for the week. Start from an I/O specification and algorithm.
  2. Write a Python function named c_to_f that takes two Celsius temperatures in parameters m and n such that mn and prints a table showing all Celsius degrees between m and n (with an increment of one degree) in one column and the equivalent Fahrenheit degrees (with an increment of 9/5 degrees) in another column.
  3. Write a Python function named max that takes two numbers in parameters and returns the maximum of the two. Then, using the function max, write a Python function named max_of_three that takes three numbers in parameters and returns the maximum of the three.
  4. A year is a leap year if it is divisible by 4 unless it is a century year that is not divisible by 400 (for example, 1900 was not a leap year while 2000 was). Write a boolean-valued function named is_leap that takes a year in a parameter and returns True if it is a leap year and False otherwise.
Finally, do not forget to review all the laboratory, homework and quiz problems. The laboratory, homework and quiz problems are as important as those given above.


* CPSC 115L home page
Valid HTML 4.01!