Thursday, September 17, 2009

Lab 5

If statements

1) calculate a grade. usually is average of midterm and final, but if the bribe is greater than $50, then the student gets 100.

2) make a program which asks for a password, and if the password (which is "swordfish") is correct, tell them the secret. otherwise, insult them and exit the program.

3) modify your temperature conversion program from last lab. This time, at the start, after taking in the degrees in Kelvin, ask them in what temperature they would like the result. Then, tell them what the result is in that temp scale.

4) Read through the web page here on modulo arithmetic. Write a program which will solve all the problems on that page.

No comments:

Post a Comment