1 00:00:00,000 --> 00:00:04,819 [MUSIC] 2 00:00:04,819 --> 00:00:07,060 Hey, everyone, Alena here. 3 00:00:07,060 --> 00:00:10,810 Practice is vital to becoming a proficient developer. 4 00:00:10,810 --> 00:00:14,870 It solidifies what you've learned, causing it to stick in your memory. 5 00:00:14,870 --> 00:00:17,480 With deliberate practice, it becomes quicker and 6 00:00:17,480 --> 00:00:21,370 easier to solve the challenges you'll face everyday. 7 00:00:21,370 --> 00:00:22,760 So let's practice some PHP. 8 00:00:24,020 --> 00:00:26,810 This session covers creating number variables and 9 00:00:26,810 --> 00:00:29,630 applying some mathematical operations. 10 00:00:29,630 --> 00:00:33,220 This practice session is intended to follow the second stage 11 00:00:33,220 --> 00:00:35,490 of the PHP basic course. 12 00:00:35,490 --> 00:00:37,870 If you haven't taken that course already or 13 00:00:37,870 --> 00:00:40,590 find this practice session to difficult. 14 00:00:40,590 --> 00:00:45,220 Then review stage two of the PHP basics course first. 15 00:00:45,220 --> 00:00:50,300 Check the notes associated with this video for additional links and resources. 16 00:00:50,300 --> 00:00:52,200 Let's review the challenge. 17 00:00:52,200 --> 00:00:54,430 There are seven step to completing this challenge. 18 00:00:55,440 --> 00:00:57,790 The file includes the comment for each step. 19 00:00:58,910 --> 00:01:00,770 Add your code below each comment. 20 00:01:01,900 --> 00:01:03,160 Step one. 21 00:01:03,160 --> 00:01:08,080 Create a variable named Ours and set it to the integer value of 40. 22 00:01:08,080 --> 00:01:10,970 Step two. 23 00:01:10,970 --> 00:01:16,634 Create a variable named Productivity and set it to the float value of 10.5. 24 00:01:17,648 --> 00:01:21,740 Step three, create a third variable named first total and 25 00:01:21,740 --> 00:01:26,360 then set it equal to the value of multiplying hours by productivity. 26 00:01:27,770 --> 00:01:31,140 Step four, add 1 to the Ours variable. 27 00:01:32,160 --> 00:01:36,820 Step five, subtract 0.5 from the productivity variable. 28 00:01:38,180 --> 00:01:42,280 Step six, create a third variable named secondTotal and 29 00:01:42,280 --> 00:01:46,200 set it equal to the new value of multiplying hours by productivity. 30 00:01:47,370 --> 00:01:52,040 Step seven, replace the comments to add firstTotal and 31 00:01:52,040 --> 00:01:54,150 secondTotal to the following output. 32 00:01:55,280 --> 00:02:00,249 At any point to test out what you've done, 33 00:02:00,249 --> 00:02:06,194 go to View, Show Console and type php index.php. 34 00:02:11,748 --> 00:02:15,960 It's okay to make multiple attempts before coming to a solution. 35 00:02:15,960 --> 00:02:18,370 That struggle to remember what you've learned and 36 00:02:18,370 --> 00:02:22,800 apply it to the situation is what causes the knowledge to take root. 37 00:02:22,800 --> 00:02:24,370 If you do get stuck, 38 00:02:24,370 --> 00:02:28,950 I've included additional resources in the notes associated with this video. 39 00:02:28,950 --> 00:02:30,320 Go ahead and give it a try. 40 00:02:30,320 --> 00:02:32,650 And I'll show you my solution in the next video.