1
00:00:00,210 --> 00:00:01,410
In this exercise,

2
00:00:01,410 --> 00:00:05,160
you're going to be debugging the Leap Year program.

3
00:00:05,160 --> 00:00:07,530
Without looking at the original code

4
00:00:07,530 --> 00:00:10,500
or the solution code for the leap year problem,

5
00:00:10,500 --> 00:00:12,630
I want you to go from first principles,

6
00:00:12,630 --> 00:00:14,520
check and test the code,

7
00:00:14,520 --> 00:00:16,800
and see where it's going wrong,

8
00:00:16,800 --> 00:00:19,710
and then try to fix the bugs.

9
00:00:19,710 --> 00:00:21,150
And if everything went well,

10
00:00:21,150 --> 00:00:24,360
if you hit Submit, it should pass all the tests.

11
00:00:24,360 --> 00:00:26,670
You can also do test-driven development

12
00:00:26,670 --> 00:00:28,380
where you run the tests

13
00:00:28,380 --> 00:00:30,330
and then see which ones are not passing

14
00:00:30,330 --> 00:00:33,630
and figure out what's wrong with your code that way as well.

15
00:00:33,630 --> 00:00:34,713
So, have a go now.

16
00:00:36,750 --> 00:00:41,160
Now again, a simple solution but difficult to find.

17
00:00:41,160 --> 00:00:42,660
If you ran the code

18
00:00:42,660 --> 00:00:45,000
or if you tried to submit the code,

19
00:00:45,000 --> 00:00:49,110
you should have seen, in the output, a TypeError,

20
00:00:49,110 --> 00:00:50,580
and this should be a hint

21
00:00:50,580 --> 00:00:53,190
for you to start thinking about data types.

22
00:00:53,190 --> 00:00:57,420
Where is the data type not what the program expects?

23
00:00:57,420 --> 00:01:00,030
And it's of course, in the input().

24
00:01:00,030 --> 00:01:02,730
The input() comes in as a string

25
00:01:02,730 --> 00:01:05,099
and we have to convert it into an integer

26
00:01:05,099 --> 00:01:08,280
in order to be able to run the modulo operator on it.

27
00:01:08,280 --> 00:01:10,443
That is where you need to fix it.

