LINKS--
| Calorie
Project |
|
|
|
|
|
|
| Compound
Interest Project |
|
|
|
|
|
|
| General |
|
|
|
|
|
|
|
The Calorie Program
does the following:
- A mini-survey asks yes/no questions
- User answers questions
about activities that they practice during a typical day
- User
answers questions about junk foods that they eat in a typical
day
- Based on a 2000 calorie diet of a 150lb person, program
calculates the calorie gain/loss during the day.
- Program then
converts calorie gain/loss into the equivalent pound gain/loss
Explanation of the Calorie-Counter Survey
(Summary of Samantha's Essay):
- Creating
different situation seemed boring. What I had in mind was more
on the lines of having the user of the program
decide the activities and foods practiced/consumed throughout
a day. This mini-survey would have a large variety of situations
that the user could arrange, increasing the appeal of the program.
- To
create this program I needed some activities and junk foods
and their calorie gain/loss
- First I
set up a system where "1" meant yes and "2" meant no as the
responses to the questions.
I also needed
to use if/else statements to cause the computer to decide
if it
needed to calculate or not the amount of calorie loss/gain.
So, if a 1 was entered, I made the computer ask the user
how much time the activity was practiced (in terms of
hours) or
how many servings of junk food were consumed. This allows
the user to be more creative in inventing a situation.
- The
program calculates then the amounts of calories during the
day. At the end of the program, a calculation is
done to present the user with how many calories were gained
or lost during the day. It also presents the equivalent amount
of pounds gained or lost.
|