ANNOUNCEMENTS:
You may NOT use sys.exit() in Program 2, or in
any program in this course.
Your program should ask the user to predict how each of the seven tossup states will go, and the report how the election would come out if the user's predictions come true. If the user does not enter a prediction propery for some state, your program should not count the electoral votes for that state for either candidate.
Electoral College Count
Nevada (D or R):
Colorado (D or R):
New Mexico (D or R):
Ohio (D or R):
Virginia (D or R):
Florida (D or R):
New Hampshire (D or R):
If your predictions are correct, the electoral college counts will be:
Type enter to exit.
Enter your predictions!
Obama 296
McCain 238
Then, worry about counting the electoral votes for the Democrats or Republicans. For this, you will probably need a variable to hold the Democrat count and another one to hold the Republican count.
Like last time, hand in your assignment using myUCDavis. Select ECS 10 from your list of courses on the right. Left-click "Assignments" near the upper left, and then "Project 2". Click on "Drop-Off" and then "Browse". Get to your Desktop, and then to the "ECS 10" folder you made, and finally select your file. The file name should appear in the box next to the "Browse" button. Click "drop-off" to hand in your program.
If you are working in the computer classrooms, remember to take your ECS 10 folder, and your program, with you on your flash-drive.