English subtitles

← Python Programming 1 Solution - Intro to Computer Science

Get Embed Code
9 Languages

Showing Revision 6 created 05/24/2016 by Udacity Robot.

  1. [Peter] Since we want our Python code to print something,
  2. we're going to start with the print statement.
  3. And the answer would be 7 x 7 x 24.
  4. There are other ways to get at this, but I feel this is the most intuitive.
  5. The 7 corresponds to the number of weeks.
  6. The second 7 corresponds to the number of days we're calculating in each week,
  7. and the 24 is the number of hours in each day.
  8. So let's run this in the Python interpreter to see what the result is.
  9. If we enter in the Python expression that we generated and click Run,
  10. we get 1176, which is the correct answer.