CSci 1101 Problem set 3. Due Tuesday, March 1st at 11:59pm

Problem 1, Conditionals. (5 points)

In the voting program in the previous problem set print out the name of the winner. If it's a tie, print out both names and a message saying that they got equal number of votes.
Important: Copy your program from the previous problem set into a new file, do not change the original program.

Problem 2, Loops. (10 points)

Write a program that creates a row of table cells with alternating colors (for instance, the first cell is blue, the second one is yellow, then blue again, etc.). The number of cells is taken as an input.

Problem 3, Arrays and loops. (10 points)

Write a program that adds all elements of an array of numbers and prints out the sum. Define an array in the beginning of the program. If the array changes, the sum should change accordingly.

Testing and submitting your code

To submit your programs, make sure that your current version is uploaded to csci1101sp10 and send me an e-mail with the URLs of your work, including the input names (i.e. extended URLs) when applicable.


CSci 1101 course web site.