for loop and one if statement.
*.py file, via Moodle.
Here are some examples of project ideas. You are welcome to use any of these. Feel free to expand (or simplify) any of these suggestions; alternatively, you are greatly encouraged to pursue your own project ideas. In any event, make sure your submissions fulfill to the above requirements.
NOTE: A program need not be long to be useful. All of my solutions for the project ideas below were 24 lines or less.
Thomas Edison 7.50 5 10 7 6.5 Albert Einstein 8.50 8 8 8 8 8 Gilbert Chesterton 32.00 10 5 10 10 8 Ferris Bueller 17.75 1 1 1 5The program will calculate the amount that each employee is to be paid. It will generate an output file containing the name and payment for each employee. Below is a sample output file:
$ 213.75: Edison, Thomas $ 340.00: Einstein, Albert $1376.00: Chesterton, Gilbert $ 142.00: Bueller, Ferris
Thomas Edison 53 67 40 80 90 100 Albert Einstein 80 80 70 70 90 90 Gilbert Chesterton 95 85 75 95 85 Ferris Bueller 0 0 50 100 0 80The program will generate an output file that will serve as a report for the registrar. The output file will contain the student name and letter grade. Below is a sample output file:
Edison, Thomas: C Einstein, Albert: B Chesterton, Gilbert: B Bueller, Ferris: F
forward 50 right 90 forward 50 right 90 forward 50 right 90 penup forward 50 pendown forward 50Here is an image that is generated by this program:
3 * 2 14 + 13 5 / 2 20 - 13 3 ** 2Here is a sample tutoring session:
>>> math('math.txt', 'mathResults.txt')
3 * 2 = 6
Correct!
14 + 13 = 22
Sorry, the answer is 27
5 / 2 = 2
Sorry, the answer is 2.5
20 - 13 = 7
Correct!
3 ** 2 = 9
Correct!
Score: 60.00%
Here is a sample output file:
Score: 60.00% Correctly answered: 3 * 2 20 - 13 3 ** 2 Incorrectly answered: 14 + 13 5 / 2