1
00:00:00,330 --> 00:00:05,320
Hope you had fun building the quiz, if you solved it, then you're on fire if you had some trouble.

2
00:00:05,370 --> 00:00:06,210
Not a problem.

3
00:00:06,210 --> 00:00:07,310
We can go over it now.

4
00:00:09,260 --> 00:00:14,690
And we're going to use again, next line to pick up each answer, so string answer one.

5
00:00:16,580 --> 00:00:18,560
Is equal to Skender next line.

6
00:00:24,220 --> 00:00:26,170
And we'll copy this three times.

7
00:00:34,320 --> 00:00:36,810
And don't forget to rename each variable.

8
00:00:40,010 --> 00:00:44,270
And now scandal next line picks up each answer and stores it in a variable, easy enough.

9
00:00:45,720 --> 00:00:52,080
The next task is to check each answer, and so these are starts with a score of zero and using if statements

10
00:00:52,080 --> 00:00:58,180
you can compare each answer against the correct one will say if an answer one is correct, epiphytic

11
00:00:58,230 --> 00:00:58,830
will see.

12
00:01:05,150 --> 00:01:10,520
In which case, update their score by five and if answer two equals a.

13
00:01:24,010 --> 00:01:28,420
We're going to add five as well, if answer three equals D.

14
00:01:36,880 --> 00:01:38,680
Update their score by five.

15
00:01:42,580 --> 00:01:48,700
And remember that the final answer can be a oraibi, so we'll check if answer four is equal to a.

16
00:01:53,490 --> 00:01:55,290
If answer four is equal to be.

17
00:02:05,090 --> 00:02:10,820
In which case, we're going to update the number of points by five and you'll notice that each statement

18
00:02:10,820 --> 00:02:15,960
looks pretty much the same, if their answer matches the correct one, the condition turns true.

19
00:02:16,370 --> 00:02:19,970
The code runs to update the score by an additional five points.

20
00:02:20,360 --> 00:02:21,110
Easy enough.

21
00:02:21,870 --> 00:02:25,140
And the last task was to print a message that depends on the user score.

22
00:02:25,610 --> 00:02:29,960
So if they score 15 or higher, if score is bigger than or equal to 15.

23
00:02:35,740 --> 00:02:38,320
We're going to print wow, you know, your stuff.

24
00:02:45,880 --> 00:02:52,060
If that's false, we'll say else if the check if there scores five and higher, but less than 15.

25
00:02:59,400 --> 00:03:03,390
If their score is in the range of five and 15 will print, not bad.

26
00:03:04,710 --> 00:03:10,200
And if even that's false, then the score is obviously less than five, in which case we're going to

27
00:03:10,200 --> 00:03:12,840
print better luck next time.

28
00:03:21,200 --> 00:03:22,730
They were ready to run our code.

29
00:03:34,000 --> 00:03:36,820
And I'll enter the correct answers, see?

30
00:03:43,390 --> 00:03:47,620
Here we can write A or B, does it matter and what happened?

31
00:03:48,250 --> 00:03:49,860
It seems my number three is incorrect.

32
00:03:49,870 --> 00:03:52,870
The answer should be D was tricked by my own quiz.

33
00:03:53,470 --> 00:03:53,860
All right.

34
00:03:53,860 --> 00:03:55,780
I'll rerun my code now.

35
00:03:55,780 --> 00:03:58,300
Keep my answers the same, but I'll put a D here.

36
00:03:59,780 --> 00:04:04,250
And there you go, my output is a perfect score, Prince, the right message.

37
00:04:05,030 --> 00:04:09,710
Final task is to run some test cases to really test our code and make sure that it's robust.

38
00:04:10,490 --> 00:04:14,360
So I'm going to rerun the quiz with three wrong answers and only one correct answer.

39
00:04:14,690 --> 00:04:16,339
B, C, D, c.

40
00:04:17,899 --> 00:04:22,630
And because they got three wrong, I get a five out of 20 and a not that good.

41
00:04:23,120 --> 00:04:26,060
That's true on the quiz with the wrong answers to every question.

42
00:04:29,290 --> 00:04:30,400
And I get a zero.

43
00:04:30,640 --> 00:04:36,100
OK, so everything is working out well so far this time I'll make sure the first two are correct and

44
00:04:36,100 --> 00:04:37,510
the last two are wrong.

45
00:04:37,840 --> 00:04:41,200
As I expected, 10 out of 20, not bad at all.

46
00:04:41,690 --> 00:04:44,170
After testing my code, it seems to work well.

47
00:04:44,770 --> 00:04:46,980
I hope you had fun taking on this challenge.

48
00:04:47,290 --> 00:04:49,770
That's all for booleans and conditionals.

49
00:04:50,230 --> 00:04:53,260
I'll see you in the next section functions.

