Intro to Computer Science

PA03

Working with Iteration


Code due to the Program Submission System on by 2/13 at 11:59pm


Introduction

This week we have been working with for and while loops.  Let's see if you understand this idea.

Notes and requirements:


Program 3.1 (5 points)

Create a program named money.py


Program 3.2 (8 points)

Create a program named elevator.py


Have you ever noticed a sign like this on an elevator? Have you ever wondered if the people on the elevator were within the rated load?

In this problem you will write code that:


Program 3.3 (12 points)

Write a program called disarm.py

You are cleaning up in the Hall of Justice the morning after a huge Super Friends bash when a call comes in.... 

"This is the League of Doom!" 

"We are going to blow up Aquaman with one billion pounds of TNT, if you don't give us a bazillion dollars!!!" 

"..." 

"..." 

"..." 

"We have Batman, too" 

Now something has to be done, but there is no one around. It is all up to you. 

Just then a batarang crashes through the window with a message from Batman:

  The code to defuse the bomb is taking all the numbers of the geometric sequence 
  of 2 under a certain number N and multiplying them together.

Final Submission

Please submit all three programs to the Program Submission System by the due date and time.