Introduction to Computer Science I

  Homework 2

Due by 1:30pm on Tuesday, January 18


Reading

Read chapter 3 of the textbook and the week 2 lecture notes.

Problems

Solve the following by implementing the corresponding functions in homework2.py. This means replacing, for every function, the original function body (the  pass statement) with your own function body. You should not modify the function signatures (the lines starting with def) in any way. When done, submit that file through D2L.

[Lab]
Exercise 3.23 (f), by implementing function forLoop().

[Lab] Problems 3.34, 3.35, 3.38, 3.40

Problems 3.37, 3.39, 3.41, 3.42, and 3.43.