1
00:00:00,960 --> 00:00:04,820
OK so I have one more exercise here and this one is optional.

2
00:00:05,100 --> 00:00:11,730
It's only if you want some extra practice with numbers and strings and doing some simple math and prompts

3
00:00:11,730 --> 00:00:14,670
and cancel that log the way that it's going to work.

4
00:00:14,670 --> 00:00:19,860
It's a age calculator that asks you for your age in years.

5
00:00:19,920 --> 00:00:26,500
So like 50 and then you enter 50 in and it will tell you roughly how many days you've been alive.

6
00:00:26,670 --> 00:00:28,190
So it's very simple logic.

7
00:00:28,260 --> 00:00:33,590
It doesn't actually account for what day you were born on and what month it is or report year it is

8
00:00:33,600 --> 00:00:40,860
now all that it does is take the number that you give it like 50 and multiply it by three hundred and

9
00:00:40,860 --> 00:00:41,860
sixty five.

10
00:00:42,150 --> 00:00:47,210
And if you want to get fancy there's a simple way to include leap years that also in the solution.

11
00:00:47,400 --> 00:00:50,040
So here's a quick demo of how it works.

12
00:00:50,100 --> 00:00:54,170
I'll refresh the page and it starts by asking me for an age.

13
00:00:54,300 --> 00:00:57,730
So enter 5 and then it tells me five years.

14
00:00:57,740 --> 00:01:02,330
It's roughly one thousand eight hundred twenty six point to five days.

15
00:01:03,120 --> 00:01:04,380
And that's it.

16
00:01:04,380 --> 00:01:07,850
So go ahead and give this one a shot and then I'll be back with the solution.

17
00:01:07,860 --> 00:01:08,860
And just a few seconds
