1 00:00:00,000 --> 00:00:00,500 2 00:00:00,500 --> 00:00:02,410 BRIAN YU: Let's dive into helpers.c, where 3 00:00:02,410 --> 00:00:04,120 you'll be writing all of your code. 4 00:00:04,120 --> 00:00:07,540 In this problem, we're asking you to implement three different functions 5 00:00:07,540 --> 00:00:09,160 in helpers.c-- 6 00:00:09,160 --> 00:00:13,000 is_rest, duration, and frequency. 7 00:00:13,000 --> 00:00:15,490 Let's take a look at is_rest first. 8 00:00:15,490 --> 00:00:17,770 The goal of is_rest is going to be a function 9 00:00:17,770 --> 00:00:21,670 that we can see from its signature takes in a string, which we'll call s, 10 00:00:21,670 --> 00:00:23,230 and returns a Boolean. 11 00:00:23,230 --> 00:00:28,750 And effectively all is_rest needs to do is if s represents a rest, returns 12 00:00:28,750 --> 00:00:29,840 true. 13 00:00:29,840 --> 00:00:32,870 Otherwise it's going to return false. 14 00:00:32,870 --> 00:00:36,580 So if you think back to how we represented rests using our notation 15 00:00:36,580 --> 00:00:38,920 and what notes looked like on a given line 16 00:00:38,920 --> 00:00:41,470 and what rests looked like in a given line, 17 00:00:41,470 --> 00:00:44,830 you'll be able to figure out what it means for a particular line 18 00:00:44,830 --> 00:00:46,510 to represent a rest. 19 00:00:46,510 --> 00:00:49,750 If you're unsure, just think back to what our representation looks like 20 00:00:49,750 --> 00:00:54,810 and how notes and rests are represented, and rest assured, you'll figure it out. 21 00:00:54,810 --> 00:00:56,171