English 字幕

← Try an Example - Intro to Computer Science

埋め込みコードを取得する
2言語

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

  1. So let's try an example. Suppose we wanted to find the days between dates. 2013
  2. Janurary 24, and 2013 June 29th. If we were going to do this as a human we might
  3. look at a calendar. I happen to have a calendar handy and thanks to my auntie in
  4. Belfast for sending me the calendar and we could count the days using the
  5. calendar so let's look at the calendar. We have our starting day is January 24
  6. and we might count the days between January 24. How many do we have left in
  7. January. So there would be 1,2, 3, 4, 5, 6, 7 days left in January. So there'd
  8. be seven days in January. Then we have, have all of February, all of February is
  9. 28 days. Then we have all of March, 31 days. All of April, 30 days. All of May,
  10. 31 days. And then we have June. We don't want to count all of June because we
  11. are stopping on June 29th, so we are going to add 29 days. From June, and if we
  12. sum all those up we should get our answer. And as a human we know how to compute
  13. sums by entering sums into Google, and we get 156.