1 00:00:00,600 --> 00:00:03,985 All right, the problem we're going to solve is a pretty common one and 2 00:00:03,985 --> 00:00:06,870 is used in interview questions fairly often. 3 00:00:06,870 --> 00:00:08,810 It's called the fizz buzz problem. 4 00:00:08,810 --> 00:00:10,620 And here's how it goes. 5 00:00:10,620 --> 00:00:14,750 Given a random number if the number is divisible by three, 6 00:00:14,750 --> 00:00:19,250 then you print out the string Fizz exactly like I've shown you. 7 00:00:19,250 --> 00:00:23,100 And if it's divisible by five, then you print out the word buzz, 8 00:00:23,100 --> 00:00:24,370 again like you see here. 9 00:00:25,560 --> 00:00:30,050 Remember when writing code and printing strings the case of each letter, 10 00:00:30,050 --> 00:00:32,810 that is whether it's uppercase or lowercase, matters. 11 00:00:33,890 --> 00:00:38,870 Lastly if it's divisible by both three and five then print FizzBuzz. 12 00:00:39,990 --> 00:00:44,640 If the number isn't divisible by either, then just print the number out, itself. 13 00:00:44,640 --> 00:00:47,900 This is a good challenge to attempt, 14 00:00:47,900 --> 00:00:51,020 because it takes into account many of the different things we've learned, 15 00:00:51,020 --> 00:00:52,890 and there's different ways that you can solve it. 16 00:00:53,900 --> 00:00:56,270 If you're having a tough time, don't worry. 17 00:00:56,270 --> 00:01:00,680 I've provided the solutions in a video following this one, but try your best 18 00:01:00,680 --> 00:01:04,740 before you watch that video, you'll feel way better if you figure it out yourself. 19 00:01:05,960 --> 00:01:10,720 As a hint, one way you can figure out if a number is divisible by another 20 00:01:10,720 --> 00:01:13,550 is by using the remainder operator. 21 00:01:13,550 --> 00:01:18,080 We know that 14 is perfectly divisible by 7 because the remainder is zero. 22 00:01:19,630 --> 00:01:20,520 After this video, 23 00:01:20,520 --> 00:01:24,210 there's an empty code challenge where you can paste your solution. 24 00:01:24,210 --> 00:01:27,290 It's probably easier for you to work on it in a playground and 25 00:01:27,290 --> 00:01:30,650 get a working solution, which you can then paste in the editor. 26 00:01:30,650 --> 00:01:31,770 All right, good luck.