Compsci 6, Fall 2011, Classwork 2

PRINT Names and NetID of students in group (min 2, max 3)
Name: __________________________ NetID: _____________   Name: __________________________   NetID: _____________

Name: __________________________ NetID: _____________

Starting Python Programs

For the following problems, first discuss an algorithm to solve the problem and then second try writing Python code (on paper) to solve the problem.

  1. Doing Laundry

    Consider the problem of trying to do a number of loads of laundry, given only one washer and one dryer. Washing a load takes 25 minutes, drying a load takes 25 minutes, and folding the clothes in a load takes 10 minutes, for a total of 1 hour per load (assuming that the time to transfer a load is built into the timings given). Ten loads of laundry can be done in 10 hours, 600 minutes, using the method of completing one load before starting the next one.

    1. Write a Python program to determine the shortest time needed to do any number of loads of laundry.