1 00:00:00,000 --> 00:00:09,207 [MUSIC] 2 00:00:09,207 --> 00:00:13,035 Hi my name is Megan and I'm a teacher here at Treehouse. 3 00:00:13,035 --> 00:00:18,308 In this practice session I'm going to test your knowledge of OOP vocabulary. 4 00:00:18,308 --> 00:00:23,299 I'm sure you realize pretty quickly that learning OOP comes with a large new set of 5 00:00:23,299 --> 00:00:25,400 vocabulary words. 6 00:00:25,400 --> 00:00:29,856 I'm going to give you a file with some prompts using OOP vocabulary to test your 7 00:00:29,856 --> 00:00:31,560 knowledge. 8 00:00:31,560 --> 00:00:34,430 The file can be found in the attached workspace, 9 00:00:34,430 --> 00:00:38,497 or in the downloads tab below this video, if you wanna work locally. 10 00:00:38,497 --> 00:00:43,960 I also listed the instructions in the Teacher's Notes just in case you need them. 11 00:00:43,960 --> 00:00:44,860 Ready for the challenge? 12 00:00:47,290 --> 00:00:51,790 First, I want you to create a class called Treehouse. 13 00:00:51,790 --> 00:00:56,400 Second, add a class attribute called product that is 14 00:00:56,400 --> 00:00:59,580 equal to the string coding courses. 15 00:01:00,870 --> 00:01:07,990 Third, add an initializer method that takes a parameter called name. 16 00:01:07,990 --> 00:01:15,918 Fourth, add a name instance attribute set equal to the parameter being passed in. 17 00:01:15,918 --> 00:01:19,681 Fifth, create a method called learn. 18 00:01:19,681 --> 00:01:25,922 Inside the method, return a string that contains the name instance attribute, 19 00:01:25,922 --> 00:01:30,416 so you would get something like, Tim is learning to code, 20 00:01:30,416 --> 00:01:33,830 where Tim is the name passed into the class. 21 00:01:35,580 --> 00:01:42,090 Sixth, create an instance of the class and save it to a variable named my_treehouse. 22 00:01:42,090 --> 00:01:44,460 Pass in your name as the name parameter. 23 00:01:45,980 --> 00:01:52,640 Seventh and final step, call your learn method and print out the result. 24 00:01:52,640 --> 00:01:57,630 When you run the file, No 25 00:01:57,630 --> 00:02:02,755 errors should be encountered and the phrase, Megan is learning to code, 26 00:02:02,755 --> 00:02:08,063 should be printed to the console where Megan is your name that you passed in. 27 00:02:08,063 --> 00:02:08,801 Good luck.