Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and beginning April 20th, 2021 (Eastern Time) the Yahoo Answers website will be in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.

Coming up with an algorithm for this problem. Pedometer Calculator?

A dietician wants you to write a program that will calculate the number of calories a person can use by walking at a slow pace for a mile. However, she only has the distance on the pedometer, which is measured in steps and not miles. 1 mile = 2000 steps. For every mile a person uses 65 calories. Allow the program user to enter the number of steps taken throughout their day. The program will calculate the distance in miles and the number of calories used up. The user should be able to enter the day of the week the data is being calculated for. The day of the week, distance in miles and the calories should then be displayed on screen.

I have so far come up with this formula A= number of steps divided by B which = 2000 which the result should be C which is the number of miles. A/B=C then C*65. Am i correct so far on this? I don't want the whole answer because i want to figure out the pseudocode, flowchart and python code on my own so i'll actually learn but am i on the right path?

2 Answers

Relevance
  • 1 decade ago
    Favorite Answer

    Calories_Used = [Number_of_Steps/2000] * 65

    =

    C = A/B * 65

    -

  • Anonymous
    5 years ago

    I do not believe that is right

Still have questions? Get your answers by asking now.