title
Learn to Program 2 : Looping

description
Code & Transcript : http://goo.gl/jUn6Pr Get my Ultimate Python Tutorial Series for FREE until September 27 : http://bit.ly/UltimatePython Best Python Book : http://amzn.to/28NPbyj 1st Tutorial : https://goo.gl/17OPJH Support me on Patreon : https://www.patreon.com/derekbanas In this tutorial we will cover more complicated problems while covering how looping works in Python. We'll cover for, range, floats, order of operations, while, break, continue and more. I'm covering the many different types of common problems you will see when programming and with practice you'll vastly improve at solving any problem. Don't worry if you get anything wrong because that is part of the learning process. Thank you to Patreon supports like the following for helping me make this video https://www.facebook.com/cottageindustriesbuild/ @kyleaisho @thetwistedhat vjFaLk

detail
{'title': 'Learn to Program 2 : Looping', 'heatmap': [{'end': 206.308, 'start': 164.157, 'weight': 0.994}, {'end': 1004.464, 'start': 966.542, 'weight': 1}, {'end': 1787.775, 'start': 1750.036, 'weight': 0.947}], 'summary': 'Covers python looping, working with floating point numbers, investment calculation, control flow, and pine tree drawing, emphasizing concepts such as modulus, compounding interest, precision of floating point numbers, while loops, and creating tree patterns.', 'chapters': [{'end': 305.059, 'segs': [{'end': 27.308, 'src': 'embed', 'start': 0.151, 'weight': 7, 'content': [{'end': 6.215, 'text': 'Well hello internet and welcome to part two of my tutorial on learning how to program by solving problems.', 'start': 0.151, 'duration': 6.064}, {'end': 10.438, 'text': "In this tutorial we're going to continue on where we left off from part one.", 'start': 6.455, 'duration': 3.983}, {'end': 12.519, 'text': "If you didn't watch part one definitely watch that.", 'start': 10.518, 'duration': 2.001}, {'end': 18.403, 'text': "There's a link in the description as well as a link to a cheat sheet as well as a transcript of the entire video.", 'start': 12.579, 'duration': 5.824}, {'end': 20.485, 'text': "And I have a lot to do so let's get into it.", 'start': 18.604, 'duration': 1.881}, {'end': 27.308, 'text': 'Okay, so here I am back inside of PyCharm and, like I said before, every program is going to have the ability,', 'start': 21.547, 'duration': 5.761}], 'summary': 'Part two of programming tutorial continues from part one.', 'duration': 27.157, 'max_score': 0.151, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/swQEbZ6ez1I/pics/swQEbZ6ez1I151.jpg'}, {'end': 150.435, 'src': 'embed', 'start': 79.165, 'weight': 0, 'content': [{'end': 89.21, 'text': 'you can also use another tool called range to define the list for us, and if we would come in here and say range 10,', 'start': 79.165, 'duration': 10.045}, {'end': 96.294, 'text': "then range will create a list starting at 0 and go up to, but not include the value that's passed to it.", 'start': 89.21, 'duration': 7.084}, {'end': 99.035, 'text': "so it's not going to include 10 in this situation.", 'start': 96.294, 'duration': 2.741}, {'end': 105.28, 'text': "And if we run that, you're going to see that it cycles through starting at 0 and prints out the whole way through 9..", 'start': 99.395, 'duration': 5.885}, {'end': 109.363, 'text': "We're also going to be able to define the start and the end.", 'start': 105.28, 'duration': 4.083}, {'end': 116.728, 'text': "So if, let's say, we wanted to cycle through here and print out 2 through 9, we could also do that, as you can see right there,", 'start': 109.723, 'duration': 7.005}, {'end': 118.47, 'text': '2 the whole way through 9..', 'start': 116.728, 'duration': 1.742}, {'end': 122.553, 'text': "And before we get to our problem here, in which we're going to use a for loop,", 'start': 118.47, 'duration': 4.083}, {'end': 128.077, 'text': 'I wanted to also talk about how we can use modulus to see if a number is odd or even.', 'start': 122.553, 'duration': 5.524}, {'end': 141.388, 'text': "Now, if we divide, and even by 2, so let's say we do something like i with the modulus of 2, and then we go and check if the returned value remember,", 'start': 128.417, 'duration': 12.971}, {'end': 144.73, 'text': 'modulus returns the remainder of a division.', 'start': 141.388, 'duration': 3.342}, {'end': 150.435, 'text': 'if this comes back as 0, then in this situation that we know that this indeed is odd.', 'start': 144.73, 'duration': 5.705}], 'summary': 'Introduction to using range, for loops, and modulus in python for iterating through lists and determining odd or even numbers.', 'duration': 71.27, 'max_score': 79.165, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/swQEbZ6ez1I/pics/swQEbZ6ez1I79165.jpg'}, {'end': 206.308, 'src': 'heatmap', 'start': 164.157, 'weight': 0.994, 'content': [{'end': 168.52, 'text': 'so we can go and we can run it and you can see, the true comes back.', 'start': 164.157, 'duration': 4.363}, {'end': 174.525, 'text': 'so that is one way that we can check to see if a value is indeed either even or odd,', 'start': 168.52, 'duration': 6.005}, {'end': 182.432, 'text': "and we're going to use that in our very first problem we're going to have here, in which I'm going to ask you to print odds from 1 to 20,", 'start': 174.525, 'duration': 7.907}, {'end': 186.955, 'text': "And what you're going to want to do here is use a for loop as well as range.", 'start': 182.432, 'duration': 4.523}, {'end': 192.018, 'text': "And then you're also going to use if and modulus to print out the odds.", 'start': 187.235, 'duration': 4.783}, {'end': 200.364, 'text': "So you can either pause the video here or I'm going to give you a couple tips on exactly what you're going to do each way through and then see if you get the right answer.", 'start': 192.479, 'duration': 7.885}, {'end': 206.308, 'text': "So, if you want to see some tips, what we're going to do here first is we're going to use a for loop that is,", 'start': 200.504, 'duration': 5.804}], 'summary': 'Using for loop and modulus to print odds from 1 to 20.', 'duration': 42.151, 'max_score': 164.157, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/swQEbZ6ez1I/pics/swQEbZ6ez1I164157.jpg'}, {'end': 305.059, 'src': 'embed', 'start': 260.091, 'weight': 5, 'content': [{'end': 272.516, 'text': "and next thing we're going to want to do is use modulus to check that the result is not equal to 0 and And we need to intent and remember we want to use whitespace and we want to do or perform these actions inside of our for loop.", 'start': 260.091, 'duration': 12.425}, {'end': 280.94, 'text': "So what we're going to do is we're going to go if i modulus 2, and this time instead of equals, we're going to say not equal to 0.", 'start': 272.736, 'duration': 8.204}, {'end': 282.141, 'text': 'Put our colon inside of there.', 'start': 280.94, 'duration': 1.201}, {'end': 285.764, 'text': "and then, whenever we come down here, we're going to indent once again,", 'start': 282.461, 'duration': 3.303}, {'end': 292.729, 'text': "because we're inside of the if statement and we are going to print all of the values for i.", 'start': 285.764, 'duration': 6.965}, {'end': 300.295, 'text': 'and if we run that, you can see, indeed that that does work cycle through one, three, da da, da, da da and the whole way through 19,', 'start': 292.729, 'duration': 7.566}, {'end': 305.059, 'text': 'and that is how we would go and cycle through and print out all the odds.', 'start': 300.295, 'duration': 4.764}], 'summary': 'Using modulus to check for odd numbers in a loop and printing the values for i.', 'duration': 44.968, 'max_score': 260.091, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/swQEbZ6ez1I/pics/swQEbZ6ez1I260091.jpg'}], 'start': 0.151, 'title': 'Python looping and modulus', 'summary': 'Covers looping through a range of numbers, using modulus to check if a number is odd or even, and printing the result, with an example of checking if a number is odd or even using modulus and a for loop.', 'chapters': [{'end': 105.28, 'start': 0.151, 'title': 'Learning to program: for loops and range', 'summary': 'Demonstrates the usage of for loops in python to iterate through a list of values and explains the function of range, showcasing that it creates a list starting at 0 and going up to, but not including the specified value, with a clear demonstration using even numbers and the range function.', 'duration': 105.129, 'highlights': ['The chapter demonstrates the usage of for loops in Python to iterate through a list of values, providing a clear example of cycling through even numbers and printing out the values.', 'It explains the function of range, showcasing that it creates a list starting at 0 and going up to, but not including the specified value, with a clear demonstration using the range function with a value of 10.']}, {'end': 174.525, 'start': 105.28, 'title': 'Python looping and modulus', 'summary': 'Covers looping through a range of numbers, using modulus to check if a number is odd or even, and printing the result, with an example of checking if a number is odd or even using modulus and a for loop.', 'duration': 69.245, 'highlights': ['Loop through a range of numbers and print specific values The chapter demonstrates the ability to cycle through and print specific values in a range, such as printing numbers 2 through 9.', 'Using modulus to check if a number is odd or even The chapter explains using modulus to determine if a number is odd or even, with the example of checking if a number is odd by dividing it by 2 and checking if the remainder is 0.', "Example of using modulus and for loop to check if a number is odd or even The chapter provides an example of using a for loop and modulus to verify if a number is odd or even, demonstrating the process of assigning a value, using modulus to check if it's odd, and printing the result."]}, {'end': 305.059, 'start': 174.525, 'title': 'Printing odds 1-20 using python', 'summary': 'Demonstrates how to print odd numbers from 1 to 20 using python, utilizing for loops, range, if statements, and modulus operations, resulting in a successful output of odd numbers from 1 to 19.', 'duration': 130.534, 'highlights': ['Using a for loop to cycle through the list from 1 to 20 and utilizing modulus to check that the result is not equal to zero.', 'Applying if statements to ensure the result is not equal to zero and then printing the odd numbers from 1 to 19.', 'Encouraging the audience to attempt solving the problem independently and referring to cheat sheets from the previous parts of the video for assistance.']}], 'duration': 304.908, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/swQEbZ6ez1I/pics/swQEbZ6ez1I151.jpg', 'highlights': ['The chapter provides a clear example of cycling through even numbers and printing out the values.', 'It showcases the function of range, creating a list starting at 0 and going up to, but not including the specified value.', 'The chapter demonstrates the ability to cycle through and print specific values in a range, such as printing numbers 2 through 9.', 'It explains using modulus to determine if a number is odd or even, with the example of checking if a number is odd by dividing it by 2 and checking if the remainder is 0.', "The chapter provides an example of using a for loop and modulus to verify if a number is odd or even, demonstrating the process of assigning a value, using modulus to check if it's odd, and printing the result.", 'Using a for loop to cycle through the list from 1 to 20 and utilizing modulus to check that the result is not equal to zero.', 'Applying if statements to ensure the result is not equal to zero and then printing the odd numbers from 1 to 19.', 'Encouraging the audience to attempt solving the problem independently and referring to cheat sheets from the previous parts of the video for assistance.']}, {'end': 512.772, 'segs': [{'end': 354.92, 'src': 'embed', 'start': 305.059, 'weight': 2, 'content': [{'end': 306.96, 'text': 'so hopefully you got that answer right.', 'start': 305.059, 'duration': 1.901}, {'end': 311.384, 'text': "if not, don't worry about it, as you do more and more of these in practice, you will get better.", 'start': 306.96, 'duration': 4.424}, {'end': 314.836, 'text': 'Now I want to talk about working with floating point numbers.', 'start': 311.653, 'duration': 3.183}, {'end': 319.22, 'text': 'Now a floating point number is just a number with decimal values.', 'start': 315.156, 'duration': 4.064}, {'end': 322.123, 'text': "And let's come in here and let's create one.", 'start': 319.701, 'duration': 2.422}, {'end': 325.666, 'text': "So I'm going to say that I want to receive a value.", 'start': 322.203, 'duration': 3.463}, {'end': 331.277, 'text': "input and we'll ask the user to enter a float.", 'start': 326.832, 'duration': 4.445}, {'end': 339.406, 'text': 'then, of course, we want to convert this from the string into a float and, just like we used int previously,', 'start': 331.277, 'duration': 8.129}, {'end': 345.773, 'text': "now we're going to use the float function to convert from a string into a floating point number,", 'start': 339.406, 'duration': 6.367}, {'end': 350.617, 'text': 'And now what we want to do is print out whatever value they gave to us.', 'start': 346.033, 'duration': 4.584}, {'end': 354.92, 'text': 'And what I want to do is round it to two decimal places.', 'start': 351.137, 'duration': 3.783}], 'summary': 'Introduction to working with floating point numbers and converting strings to floats.', 'duration': 49.861, 'max_score': 305.059, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/swQEbZ6ez1I/pics/swQEbZ6ez1I305059.jpg'}, {'end': 432.186, 'src': 'embed', 'start': 396.78, 'weight': 0, 'content': [{'end': 400.483, 'text': "And in this one, what we're going to do is demonstrate compounding interest.", 'start': 396.78, 'duration': 3.703}, {'end': 414.454, 'text': "And what we're going to have to do in our program here is have the user enter their investment amount and their expected interest earned each year.", 'start': 400.924, 'duration': 13.53}, {'end': 429.444, 'text': "Then what we're gonna do is each year their investment will increase by their original investment, plus their investment multiplied times,", 'start': 414.714, 'duration': 14.73}, {'end': 432.186, 'text': 'whatever the interest rate is.', 'start': 429.444, 'duration': 2.742}], 'summary': 'Demonstrating compounding interest with user input for investment amount and interest rate.', 'duration': 35.406, 'max_score': 396.78, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/swQEbZ6ez1I/pics/swQEbZ6ez1I396780.jpg'}, {'end': 488.94, 'src': 'embed', 'start': 461.014, 'weight': 4, 'content': [{'end': 478.718, 'text': 'then I want to convert the value to a float and then, after I do that, I want to convert value to a float and round the percentage rate by two digits.', 'start': 461.014, 'duration': 17.704}, {'end': 486.779, 'text': "that's a little bit of a trick that was in this problem, because if they enter in a five for five percent, well, to perform the multiplication,", 'start': 478.718, 'duration': 8.061}, {'end': 488.94, 'text': "you're going to have to round that two digits.", 'start': 486.779, 'duration': 2.161}], 'summary': 'Convert value to float and round percentage rate by two digits.', 'duration': 27.926, 'max_score': 461.014, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/swQEbZ6ez1I/pics/swQEbZ6ez1I461014.jpg'}], 'start': 305.059, 'title': 'Working with floating point numbers and compounding interest', 'summary': 'Covers working with floating point numbers, converting strings to floating point numbers, rounding to two decimal places, and demonstrating compounding interest over a 10 year period.', 'chapters': [{'end': 396.479, 'start': 305.059, 'title': 'Working with floating point numbers', 'summary': 'Covers working with floating point numbers, including converting a string to a floating point number and rounding it to two decimal places, enabling the user to enter a float and then printing the rounded value.', 'duration': 91.42, 'highlights': ['The chapter covers working with floating point numbers, including converting a string to a floating point number and rounding it to two decimal places, enabling the user to enter a float and then printing the rounded value.', "The code demonstrates how to convert a string input to a floating point number using the float function, showcasing the process of converting '1.2345' to '0.23' when rounded to two decimal places.", 'Encouragement is given to the user, assuring that with practice, they will improve in handling floating point numbers.']}, {'end': 512.772, 'start': 396.78, 'title': 'Demonstrating compounding interest', 'summary': 'Demonstrates compounding interest by having the user enter their investment amount and expected interest earned each year, then calculating the earnings after a 10 year period.', 'duration': 115.992, 'highlights': ['The program demonstrates compounding interest by allowing the user to input their investment amount and expected interest earned each year, then calculating the earnings after a 10 year period.', 'The user is required to enter their investment amount and expected interest earned each year, followed by a demonstration of how the investment will increase annually based on the original investment and interest rate.', "The program involves converting the user's input to float values and rounding the percentage rate by two digits to enable accurate calculations."]}], 'duration': 207.713, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/swQEbZ6ez1I/pics/swQEbZ6ez1I305059.jpg', 'highlights': ['The program demonstrates compounding interest by allowing the user to input their investment amount and expected interest earned each year, then calculating the earnings after a 10 year period.', 'The user is required to enter their investment amount and expected interest earned each year, followed by a demonstration of how the investment will increase annually based on the original investment and interest rate.', 'The chapter covers working with floating point numbers, including converting a string to a floating point number and rounding it to two decimal places, enabling the user to enter a float and then printing the rounded value.', "The code demonstrates how to convert a string input to a floating point number using the float function, showcasing the process of converting '1.2345' to '0.23' when rounded to two decimal places.", "The program involves converting the user's input to float values and rounding the percentage rate by two digits to enable accurate calculations.", 'Encouragement is given to the user, assuring that with practice, they will improve in handling floating point numbers.']}, {'end': 821.32, 'segs': [{'end': 543.105, 'src': 'embed', 'start': 513.092, 'weight': 0, 'content': [{'end': 519.196, 'text': "so what we're gonna do here is we get to this point, ask for the money invested and the interest rate.", 'start': 513.092, 'duration': 6.104}, {'end': 527.04, 'text': "so I'm gonna say money is equal to input and I'm gonna say how much to invest.", 'start': 519.196, 'duration': 7.844}, {'end': 538.144, 'text': "and after we get that, I'm gonna say interest Rate is equal to input and we're going to ask for the interest rate that they expect to earn.", 'start': 527.04, 'duration': 11.104}, {'end': 543.105, 'text': "Now of course we're then going to have to convert the value to a float.", 'start': 538.444, 'duration': 4.661}], 'summary': 'The process involves asking for the amount to invest and the expected interest rate, then converting the value to a float.', 'duration': 30.013, 'max_score': 513.092, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/swQEbZ6ez1I/pics/swQEbZ6ez1I513092.jpg'}, {'end': 616.452, 'src': 'embed', 'start': 590.578, 'weight': 1, 'content': [{'end': 595.32, 'text': "And you can see as that goes on, money's value is going to continue to increase.", 'start': 590.578, 'duration': 4.742}, {'end': 596.561, 'text': 'And then, finally,', 'start': 595.74, 'duration': 0.821}, {'end': 607.907, 'text': "what we'll do is we'll say print investment after 10 years and we want to print that out and we want to round it to two decimal places, colon .2F.", 'start': 596.561, 'duration': 11.346}, {'end': 610.248, 'text': 'That is how we define.', 'start': 608.848, 'duration': 1.4}, {'end': 616.452, 'text': 'we want to put a floating point number inside of there with only two decimal places, and then the final amount of money they have.', 'start': 610.248, 'duration': 6.204}], 'summary': "Money's value will continue to increase, investment after 10 years will be printed and rounded to two decimal places.", 'duration': 25.874, 'max_score': 590.578, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/swQEbZ6ez1I/pics/swQEbZ6ez1I590578.jpg'}, {'end': 648.92, 'src': 'embed', 'start': 626.055, 'weight': 2, 'content': [{'end': 633.617, 'text': 'and you can see right there exactly how much money the person would have in their account after a ten-year period based off of a five percent interest,', 'start': 626.055, 'duration': 7.562}, {'end': 637.618, 'text': 'as well as an original investment of ten thousand dollars.', 'start': 634.217, 'duration': 3.401}, {'end': 639.798, 'text': 'so there is another problem.', 'start': 637.618, 'duration': 2.18}, {'end': 641.379, 'text': 'hopefully you did well with that.', 'start': 639.798, 'duration': 1.581}, {'end': 645.68, 'text': "once again, if there's anything that's catching you or, you know, causing any problems,", 'start': 641.379, 'duration': 4.301}, {'end': 648.92, 'text': "leave a comment below and don't worry too much if you didn't get it right.", 'start': 645.68, 'duration': 3.24}], 'summary': 'After 10 years at 5% interest, $10,000 investment would yield a specific amount.', 'duration': 22.865, 'max_score': 626.055, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/swQEbZ6ez1I/pics/swQEbZ6ez1I626055.jpg'}, {'end': 721.687, 'src': 'embed', 'start': 691.534, 'weight': 3, 'content': [{'end': 695.459, 'text': 'Just understand that floating point numbers are not necessarily precise.', 'start': 691.534, 'duration': 3.925}, {'end': 701.08, 'text': "and just as another example, let's go in here and we'll throw some gigantic numbers inside of here.", 'start': 695.979, 'duration': 5.101}, {'end': 709.223, 'text': 'these are 32 digits long and understand that floats will print nonsense beyond 16 digits of precision.', 'start': 701.08, 'duration': 8.143}, {'end': 716.185, 'text': "so for the most part, whenever you're performing calculations on one float to another float, you can trust the first 16 digits.", 'start': 709.223, 'duration': 6.962}, {'end': 721.687, 'text': "but thereafter you're gonna get pure nonsense and here I'll show you exactly how that works.", 'start': 716.185, 'duration': 5.502}], 'summary': 'Floating point numbers are imprecise, displaying nonsense beyond 16 digits of precision.', 'duration': 30.153, 'max_score': 691.534, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/swQEbZ6ez1I/pics/swQEbZ6ez1I691534.jpg'}, {'end': 827.465, 'src': 'embed', 'start': 801.145, 'weight': 4, 'content': [{'end': 804.968, 'text': 'this and you can see, indeed, that this is the way it works out here.', 'start': 801.145, 'duration': 3.823}, {'end': 809.632, 'text': "what we're doing without the parentheses is multiplying 4 times 5, first then adding 3,", 'start': 804.968, 'duration': 4.664}, {'end': 812.994, 'text': "and here what we're doing is because we have parentheses around.", 'start': 809.632, 'duration': 3.362}, {'end': 818.898, 'text': 'this is adding 3 plus 4 to get 7 and then multiplying that times 5 to get 35.', 'start': 812.994, 'duration': 5.904}, {'end': 821.32, 'text': 'so that is how order of operations work,', 'start': 818.898, 'duration': 2.422}, {'end': 827.465, 'text': 'as well as how floats work inside of Python and most programming languages and some things that you should be aware of.', 'start': 821.32, 'duration': 6.145}], 'summary': 'Order of operations and float behavior in python explained with examples.', 'duration': 26.32, 'max_score': 801.145, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/swQEbZ6ez1I/pics/swQEbZ6ez1I801145.jpg'}], 'start': 513.092, 'title': 'Investment calculation program and floating point calculations', 'summary': 'Explains a python program for investment calculation with a 10-year scenario and discusses the impreciseness of floating point numbers in programming languages, emphasizing the limits of reliable calculations beyond 16 digits.', 'chapters': [{'end': 645.68, 'start': 513.092, 'title': 'Investment calculation program', 'summary': 'Explains a python program that calculates investment returns based on input money and interest rate, demonstrating a 10-year investment scenario with $10,000 initial investment at a 5% interest rate.', 'duration': 132.588, 'highlights': ['The program prompts the user to input the amount of money to invest and the expected interest rate, then converts the values to float for calculation. The program prompts for the money invested and interest rate, converting them to float for further calculations.', 'The interest rate is converted to a percentage and rounded to two decimal places, and a for loop is used to calculate the investment growth over 10 years. The interest rate is multiplied by 0.01 to convert it to a percentage, and a for loop is utilized to calculate the investment growth over 10 years.', 'The program demonstrates a scenario of a $10,000 investment at a 5% interest rate, showing the final amount after 10 years. Demonstration of a 10-year investment scenario with a $10,000 initial investment at a 5% interest rate, displaying the final amount after 10 years.']}, {'end': 821.32, 'start': 645.68, 'title': 'Floating point calculations and order of operations', 'summary': 'Discusses the impreciseness of floating point numbers in programming languages, highlighting that calculations beyond 16 digits are unreliable, and explains the order of operations in calculations with examples.', 'duration': 175.64, 'highlights': ['Floating point numbers in programming languages are not necessarily precise, with calculations beyond 16 digits being unreliable. 16 digits', 'Order of operations in calculations is explained, demonstrating the difference in results with and without parentheses. Difference in results with and without parentheses']}], 'duration': 308.228, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/swQEbZ6ez1I/pics/swQEbZ6ez1I513092.jpg', 'highlights': ['The program prompts for the money invested and interest rate, converting them to float for further calculations.', 'A for loop is utilized to calculate the investment growth over 10 years.', 'The program demonstrates a scenario of a $10,000 investment at a 5% interest rate, showing the final amount after 10 years.', 'Floating point numbers in programming languages are not necessarily precise, with calculations beyond 16 digits being unreliable.', 'Order of operations in calculations is explained, demonstrating the difference in results with and without parentheses.']}, {'end': 1108.898, 'segs': [{'end': 851.737, 'src': 'embed', 'start': 821.32, 'weight': 1, 'content': [{'end': 827.465, 'text': 'as well as how floats work inside of Python and most programming languages and some things that you should be aware of.', 'start': 821.32, 'duration': 6.145}, {'end': 831.464, 'text': 'Now I want to talk about another looping structure called the while loop.', 'start': 828.382, 'duration': 3.082}, {'end': 837.728, 'text': 'Now we can also continue looping as long as a condition is true with a while loop.', 'start': 831.684, 'duration': 6.044}, {'end': 843.932, 'text': "And while loops are used when you don't know how many times at the beginning you're going to need to loop.", 'start': 837.968, 'duration': 5.964}, {'end': 851.737, 'text': "So what we're going to do here is we're going to use a random, what's called a random module, to generate random numbers.", 'start': 844.192, 'duration': 7.545}], 'summary': 'While loops in python can continue as long as a condition is true, useful for when the loop iterations are not predetermined.', 'duration': 30.417, 'max_score': 821.32, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/swQEbZ6ez1I/pics/swQEbZ6ez1I821320.jpg'}, {'end': 910.209, 'src': 'embed', 'start': 867.388, 'weight': 0, 'content': [{'end': 873.773, 'text': 'just understand that if we want to be able to calculate random numbers, that this library or module is needed to do so,', 'start': 867.388, 'duration': 6.385}, {'end': 880.995, 'text': "We're then going to be able to generate a random integer between 1 and 50 just by going rand num.", 'start': 874.013, 'duration': 6.982}, {'end': 882.876, 'text': "Doesn't matter what this variable is called.", 'start': 881.115, 'duration': 1.761}, {'end': 884.096, 'text': 'I just chose rand num.', 'start': 882.936, 'duration': 1.16}, {'end': 887.437, 'text': 'And then we will call random rand range.', 'start': 884.336, 'duration': 3.101}, {'end': 893.939, 'text': 'And if we want a random integer between 1 and 50, we pass in 1 and 51.', 'start': 887.897, 'duration': 6.042}, {'end': 897.24, 'text': 'And that will return a random value between 1 and 50 for us.', 'start': 893.939, 'duration': 3.301}, {'end': 908.147, 'text': 'Now whenever we want to work with a while loop, the value we are going to be incrementing in the while loop is going to be defined before the loop.', 'start': 898.38, 'duration': 9.767}, {'end': 910.209, 'text': "So that's what we're doing with i right there.", 'start': 908.308, 'duration': 1.901}], 'summary': 'Using rand module to generate random integers for while loop incrementing.', 'duration': 42.821, 'max_score': 867.388, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/swQEbZ6ez1I/pics/swQEbZ6ez1I867388.jpg'}, {'end': 1004.464, 'src': 'heatmap', 'start': 966.542, 'weight': 1, 'content': [{'end': 969.746, 'text': "And if we run this, you're going to see the random value is 5.", 'start': 966.542, 'duration': 3.204}, {'end': 970.286, 'text': 'Run it again.', 'start': 969.746, 'duration': 0.54}, {'end': 972.369, 'text': 'Random value is 30.', 'start': 970.847, 'duration': 1.522}, {'end': 972.95, 'text': 'Run it again.', 'start': 972.369, 'duration': 0.581}, {'end': 976.514, 'text': 'Random value is 40, and so forth, and so on.', 'start': 973.23, 'duration': 3.284}, {'end': 981.74, 'text': 'Now, before I ask you to do another problem, I want to talk about break and continue.', 'start': 976.854, 'duration': 4.886}, {'end': 989.588, 'text': 'Now continue is going to stop executing the code that remains in the loop and jump back to the top of the loop,', 'start': 982.08, 'duration': 7.508}, {'end': 992.251, 'text': 'while break is going to jump completely out of a loop.', 'start': 989.588, 'duration': 2.663}, {'end': 995.214, 'text': "So let's use an example here to show you exactly how those work.", 'start': 992.311, 'duration': 2.903}, {'end': 1004.464, 'text': "Let's say that I want to continue cycling through values as long as i is less than or equal to 20.", 'start': 995.374, 'duration': 9.09}], 'summary': 'Demonstration of random values and explanation of break and continue in loops.', 'duration': 37.922, 'max_score': 966.542, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/swQEbZ6ez1I/pics/swQEbZ6ez1I966542.jpg'}, {'end': 1004.464, 'src': 'embed', 'start': 976.854, 'weight': 2, 'content': [{'end': 981.74, 'text': 'Now, before I ask you to do another problem, I want to talk about break and continue.', 'start': 976.854, 'duration': 4.886}, {'end': 989.588, 'text': 'Now continue is going to stop executing the code that remains in the loop and jump back to the top of the loop,', 'start': 982.08, 'duration': 7.508}, {'end': 992.251, 'text': 'while break is going to jump completely out of a loop.', 'start': 989.588, 'duration': 2.663}, {'end': 995.214, 'text': "So let's use an example here to show you exactly how those work.", 'start': 992.311, 'duration': 2.903}, {'end': 1004.464, 'text': "Let's say that I want to continue cycling through values as long as i is less than or equal to 20.", 'start': 995.374, 'duration': 9.09}], 'summary': "Explaining 'break' and 'continue' in loops, with a practical example.", 'duration': 27.61, 'max_score': 976.854, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/swQEbZ6ez1I/pics/swQEbZ6ez1I976854.jpg'}, {'end': 1119.053, 'src': 'embed', 'start': 1092.567, 'weight': 4, 'content': [{'end': 1099.531, 'text': 'all the even values were skipped because of continue, and the value of 15 was never reached,', 'start': 1092.567, 'duration': 6.964}, {'end': 1103.614, 'text': 'even though we said we wanted to continue looping until this was equal to 20.', 'start': 1099.531, 'duration': 4.083}, {'end': 1108.898, 'text': 'and the reason why is right here when it says is i equal to 15 break, and whenever break was hit,', 'start': 1103.614, 'duration': 5.284}, {'end': 1115.19, 'text': "that means we're going to jump completely out of the loop and run code under here, or if no code exists, of course we're not going to run anything.", 'start': 1108.898, 'duration': 6.292}, {'end': 1119.053, 'text': "there's an example break as well as continue.", 'start': 1115.19, 'duration': 3.863}], 'summary': 'Even values skipped with continue, loop stopped at 15 due to break.', 'duration': 26.486, 'max_score': 1092.567, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/swQEbZ6ez1I/pics/swQEbZ6ez1I1092567.jpg'}], 'start': 821.32, 'title': 'Python loops and control flow', 'summary': 'Covers the while loop structure and usage in python, along with generating random numbers. it also discusses the concepts of break and continue in loops, providing examples of their functionality such as skipping even numbers and stopping the loop when a specific condition is met.', 'chapters': [{'end': 952.568, 'start': 821.32, 'title': 'Python while loop and random numbers', 'summary': 'Covers the while loop structure in python, its usage for looping based on a condition, and the generation of random numbers using the random module, allowing a random integer to be generated between 1 and 50.', 'duration': 131.248, 'highlights': ["The while loop is used when you don't know how many times you're going to need to loop. It provides flexibility for looping based on a condition without knowing the exact number of iterations in advance.", 'The random module in Python allows the generation of random numbers, for example, a random integer between 1 and 50. The random module enables the generation of random numbers, such as random integers within a specified range, providing a practical example of generating a random integer between 1 and 50.', 'The value to be incremented in the while loop is defined before the loop, and the condition for continuing the loop is also established. The approach of defining the incrementing value and the looping condition before entering the while loop is explained, emphasizing the importance of these initial definitions.']}, {'end': 1108.898, 'start': 952.829, 'title': 'Loop control in python: break and continue', 'summary': 'Discusses the concepts of break and continue in python loops, demonstrating how they function through examples, such as skipping even numbers and stopping the loop when a specific condition is met, ultimately printing only the odd values.', 'duration': 156.069, 'highlights': ['The chapter discusses the concepts of break and continue in Python loops. It explains how break and continue statements control the flow of a loop, impacting the iteration process.', 'Demonstrates skipping even numbers and stopping the loop when a specific condition is met. The example shows using the continue statement to skip printing even numbers and using the break statement to stop the loop when the iterator reaches 15.', 'Printing only the odd values by utilizing break and continue statements. The code showcases the use of break to stop the loop at a specific condition and continue to skip certain iterations, resulting in the printing of only the odd values.']}], 'duration': 287.578, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/swQEbZ6ez1I/pics/swQEbZ6ez1I821320.jpg', 'highlights': ['The random module in Python allows the generation of random numbers, for example, a random integer between 1 and 50.', "The while loop is used when you don't know how many times you're going to need to loop. It provides flexibility for looping based on a condition without knowing the exact number of iterations in advance.", 'The chapter discusses the concepts of break and continue in Python loops. It explains how break and continue statements control the flow of a loop, impacting the iteration process.', 'The value to be incremented in the while loop is defined before the loop, and the condition for continuing the loop is also established. The approach of defining the incrementing value and the looping condition before entering the while loop is explained, emphasizing the importance of these initial definitions.', 'Demonstrates skipping even numbers and stopping the loop when a specific condition is met. The example shows using the continue statement to skip printing even numbers and using the break statement to stop the loop when the iterator reaches 15.']}, {'end': 1363.199, 'segs': [{'end': 1174.597, 'src': 'embed', 'start': 1130.082, 'weight': 0, 'content': [{'end': 1139.93, 'text': "for example, you're going to say how tall is the tree and they are going to tell you how many rows they want in their tree,", 'start': 1130.082, 'duration': 9.848}, {'end': 1151.499, 'text': 'and then what your program is going to do is print out a tree exactly like that is going to be able to work with any number of rows and be able to print any different height of pine tree humanly possible.', 'start': 1139.93, 'duration': 11.569}, {'end': 1160.846, 'text': "so just to help you along in this, basically you're going to have to use one while loop and three for loops.", 'start': 1151.499, 'duration': 9.347}, {'end': 1163.028, 'text': "now, of course, there's multiple different ways to do this.", 'start': 1160.846, 'duration': 2.182}, {'end': 1167.471, 'text': 'this is just a guide and the ultimate goal is to just do this.', 'start': 1163.028, 'duration': 4.443}, {'end': 1172.215, 'text': "so if you think you can do that on your own, without any tips, then go, do it and see if you're right,", 'start': 1167.471, 'duration': 4.744}, {'end': 1174.597, 'text': "And otherwise I'm going to give you a couple different tips.", 'start': 1172.615, 'duration': 1.982}], 'summary': 'Program to print customizable pine tree with any number of rows and height.', 'duration': 44.515, 'max_score': 1130.082, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/swQEbZ6ez1I/pics/swQEbZ6ez1I1130082.jpg'}, {'end': 1256.346, 'src': 'embed', 'start': 1231.053, 'weight': 2, 'content': [{'end': 1237.458, 'text': "And then finally, we're going to have 0 spaces followed by 9 hashes.", 'start': 1231.053, 'duration': 6.405}, {'end': 1247.483, 'text': "Also, by analyzing this, we're going to know that This, whatever the top of our pine tree is, is going to be equivalent to wherever our stump is.", 'start': 1237.958, 'duration': 9.525}, {'end': 1251.564, 'text': 'So whenever we come in here to first print this first row,', 'start': 1247.823, 'duration': 3.741}, {'end': 1256.346, 'text': 'we should save this information so that we could also use it at the very end to get all those done.', 'start': 1251.564, 'duration': 4.782}], 'summary': 'Analysis reveals 0 spaces and 9 hashes for the top of the pine tree, with saved information for future use.', 'duration': 25.293, 'max_score': 1231.053, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/swQEbZ6ez1I/pics/swQEbZ6ez1I1231053.jpg'}, {'end': 1341.86, 'src': 'embed', 'start': 1308.974, 'weight': 3, 'content': [{'end': 1318.062, 'text': "state We're also going to decrement from tree height until it equals 0 and 5.", 'start': 1308.974, 'duration': 9.088}, {'end': 1325.249, 'text': "We're going to have to print spaces and then hashes for each row.", 'start': 1318.062, 'duration': 7.187}, {'end': 1334.396, 'text': 'And the final thing that jumps out at me here is print stump spaces and then one hash.', 'start': 1325.769, 'duration': 8.627}, {'end': 1341.86, 'text': "so for no matter how many rows they say they want in their tree, this is going to be the rules that we're going to follow right here,", 'start': 1334.396, 'duration': 7.464}], 'summary': 'Decrement from tree height, print spaces and hashes for each row, end with stump space and one hash.', 'duration': 32.886, 'max_score': 1308.974, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/swQEbZ6ez1I/pics/swQEbZ6ez1I1308974.jpg'}], 'start': 1108.898, 'title': 'Pine tree drawing and pattern', 'summary': 'Covers writing a program to draw a pine tree on the screen using one while loop and three for loops, allowing users to specify the tree height, ensuring it can work with any number of rows. it also discusses the pattern of a pine tree, outlining the steps needed to solve the problem, including decrementing spaces, incrementing hashes, saving spaces for the stump, and printing the tree and stump spaces and hashes.', 'chapters': [{'end': 1174.597, 'start': 1108.898, 'title': 'Pine tree drawing program', 'summary': 'Covers writing a program to draw a pine tree on the screen using one while loop and three for loops, allowing users to specify the tree height, and ensuring it can work with any number of rows.', 'duration': 65.699, 'highlights': ["Users will input the tree's height, and the program will print a tree of that height, with the goal of being able to work with any number of rows and print any height of pine tree possible.", 'The program will utilize one while loop and three for loops to achieve the desired output, providing a helpful guide while acknowledging there are multiple ways to accomplish this task.']}, {'end': 1363.199, 'start': 1174.957, 'title': 'Pine tree pattern problem', 'summary': 'Discusses the pattern of a pine tree, with a specific structure of spaces and hashes that develops as the tree height increases, and outlines the steps needed to solve the problem, including decrementing spaces, incrementing hashes, saving spaces for the stump, and printing the tree and stump spaces and hashes.', 'duration': 188.242, 'highlights': ['The pattern of the pine tree involves incrementing the number of hashes and decrementing the number of spaces as the tree height increases, with the top of the tree being equivalent to the stump, resulting in a specific structure for each row (Relevance: 5)', 'The steps to solve the problem include decrementing spaces by one, incrementing hashes by two, saving spaces for the stump by calculating tree height minus one, and printing spaces and hashes for each row, while also printing the stump spaces and one hash for every row (Relevance: 4)', 'The program also involves decrementing from the tree height until it equals 0, as well as implementing the defined rules for the tree pattern, which should be followed for any number of rows specified for the tree (Relevance: 3)']}], 'duration': 254.301, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/swQEbZ6ez1I/pics/swQEbZ6ez1I1108898.jpg', 'highlights': ['The program will utilize one while loop and three for loops to achieve the desired output, providing a helpful guide while acknowledging there are multiple ways to accomplish this task.', "Users will input the tree's height, and the program will print a tree of that height, with the goal of being able to work with any number of rows and print any height of pine tree possible.", 'The pattern of the pine tree involves incrementing the number of hashes and decrementing the number of spaces as the tree height increases, with the top of the tree being equivalent to the stump, resulting in a specific structure for each row (Relevance: 5)', 'The steps to solve the problem include decrementing spaces by one, incrementing hashes by two, saving spaces for the stump by calculating tree height minus one, and printing spaces and hashes for each row, while also printing the stump spaces and one hash for every row (Relevance: 4)', 'The program also involves decrementing from the tree height until it equals 0, as well as implementing the defined rules for the tree pattern, which should be followed for any number of rows specified for the tree (Relevance: 3)']}, {'end': 1570.327, 'segs': [{'end': 1466.129, 'src': 'embed', 'start': 1419.325, 'weight': 0, 'content': [{'end': 1424.029, 'text': 'so at least i decided that i think we should save that for later to save ourselves some time.', 'start': 1419.325, 'duration': 4.704}, {'end': 1433.419, 'text': "we then also want to make sure the right number of rows are printed and I'll give you a tip.", 'start': 1424.309, 'duration': 9.11}, {'end': 1437.124, 'text': "that's where the while loop is going to come into place.", 'start': 1433.419, 'duration': 3.705}, {'end': 1444.152, 'text': "we are then going to print the spaces and I'll give you a tip here because you don't know this.", 'start': 1437.124, 'duration': 7.028}, {'end': 1450.097, 'text': 'if you use a and is equal to like that inside of print,', 'start': 1444.152, 'duration': 5.945}, {'end': 1455.521, 'text': "that means a new line is not going to show up and I'll show you an example of what that looks like.", 'start': 1450.097, 'duration': 5.424}, {'end': 1461.225, 'text': "it's going to be print and then we're going to put you know whatever we have inside of there and then we'll put.", 'start': 1455.521, 'duration': 5.704}, {'end': 1466.129, 'text': 'end is equal to this guy right here and whenever we use print with end like that,', 'start': 1461.225, 'duration': 4.904}], 'summary': 'Using while loop to control the number of rows printed and printing without new lines.', 'duration': 46.804, 'max_score': 1419.325, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/swQEbZ6ez1I/pics/swQEbZ6ez1I1419325.jpg'}, {'end': 1539.834, 'src': 'embed', 'start': 1503.761, 'weight': 2, 'content': [{'end': 1515.923, 'text': 'We know from our research that we did before that spaces is decremented by one each time through our loop, and you can see indeed, if we come up here,', 'start': 1503.761, 'duration': 12.162}, {'end': 1520.964, 'text': 'you can see the space is decremented by one as well as hashes is going to be incremented by two.', 'start': 1515.923, 'duration': 5.041}, {'end': 1539.834, 'text': "So we want to increment both of those and we'll just say that hashes is incremented by two each time and then also decrement tree height each time to jump out of the loop,", 'start': 1521.284, 'duration': 18.55}], 'summary': 'Spaces decrease by 1, hashes increase by 2 in each loop iteration.', 'duration': 36.073, 'max_score': 1503.761, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/swQEbZ6ez1I/pics/swQEbZ6ez1I1503761.jpg'}], 'start': 1363.459, 'title': 'Creating and building tree patterns in python', 'summary': "Explores the creation of a tree pattern in python, covering techniques such as determining rows and hashes, managing spaces, utilizing while loops, and using 'end' with the print statement to format output.", 'chapters': [{'end': 1450.097, 'start': 1363.459, 'title': 'Creating a tree pattern', 'summary': 'Explains the process of creating a tree pattern by determining the number of rows, tracking the number of hashes, managing spaces, and utilizing a while loop for printing the pattern.', 'duration': 86.638, 'highlights': ['The first step is to get the number of rows for the tree, followed by converting it into an integer.', 'Tracking the number of hashes is essential, with the starting point being one hash that will be incremented.', "Utilizing a while loop to ensure the correct number of rows are printed is crucial for the pattern's formation.", 'Managing spaces and saving stump spaces for later optimization is a strategic decision in the process of creating the tree pattern.']}, {'end': 1503.44, 'start': 1450.097, 'title': 'Python printing techniques', 'summary': "Discusses using 'end' with the print statement to prevent new lines and allow printing of spaces and hashes without new lines, emphasizing the importance of this technique for formatting output in python.", 'duration': 53.343, 'highlights': ["Using 'end' with the print statement allows for printing spaces and hashes without new lines and is essential for formatting output in Python.", "The technique of using 'end' with the print statement is vital for printing spaces and hashes without new lines, ensuring proper formatting of the output in Python.", "Utilizing 'end' with the print statement is important for preventing new lines and enabling the printing of spaces and hashes without new lines in Python."]}, {'end': 1570.327, 'start': 1503.761, 'title': 'Building a tree pattern', 'summary': 'Explains the process of building a tree pattern in a program, detailing the decrement of spaces, increment of hashes, and the approach to solving the program step by step.', 'duration': 66.566, 'highlights': ['The program decrements spaces by one and increments hashes by two in each loop iteration.', 'The approach involves incrementing hashes by two each time and decrementing tree height to exit the loop.', 'The final step is to print the spaces before the stump and the final hash.']}], 'duration': 206.868, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/swQEbZ6ez1I/pics/swQEbZ6ez1I1363459.jpg', 'highlights': ["Utilizing a while loop to ensure the correct number of rows are printed is crucial for the pattern's formation.", "The technique of using 'end' with the print statement is vital for printing spaces and hashes without new lines, ensuring proper formatting of the output in Python.", 'The program decrements spaces by one and increments hashes by two in each loop iteration.']}, {'end': 1822.455, 'segs': [{'end': 1639.179, 'src': 'embed', 'start': 1612.795, 'weight': 2, 'content': [{'end': 1622.123, 'text': "i also know that i want to save the number of spaces before the stump, because that's going to be equivalent to the very, very top of the tree.", 'start': 1612.795, 'duration': 9.328}, {'end': 1622.864, 'text': "so i'm going to go.", 'start': 1622.123, 'duration': 0.741}, {'end': 1628.609, 'text': 'stump spaces is equal to tree height minus one, just like we did here.', 'start': 1622.864, 'duration': 5.745}, {'end': 1631.552, 'text': "i could also put spaces inside of there doesn't really matter.", 'start': 1628.609, 'duration': 2.943}, {'end': 1639.179, 'text': 'And then I want to use a while loop here to cycle through and make sure that we get out of the loop someday.', 'start': 1631.872, 'duration': 7.307}], 'summary': 'Using a while loop, track spaces before the stump to represent tree height minus one.', 'duration': 26.384, 'max_score': 1612.795, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/swQEbZ6ez1I/pics/swQEbZ6ez1I1612795.jpg'}, {'end': 1727.466, 'src': 'embed', 'start': 1702.099, 'weight': 0, 'content': [{'end': 1707.104, 'text': "that's going to print out a new line for us and then also inside of our while loop,", 'start': 1702.099, 'duration': 5.005}, {'end': 1725.065, 'text': "we are going to have to decrement each time through the number of spaces by one and we're going to have to increment the hashes by two each time we go through there and then finally We're going to have to be able to get out of our for loop altogether by going.", 'start': 1707.104, 'duration': 17.961}, {'end': 1727.466, 'text': 'tree height is equal to well.', 'start': 1725.065, 'duration': 2.401}], 'summary': 'In a while loop, the number of spaces decrements by one and the hashes increment by two each time, to print a tree of a specified height.', 'duration': 25.367, 'max_score': 1702.099, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/swQEbZ6ez1I/pics/swQEbZ6ez1I1702099.jpg'}, {'end': 1811.528, 'src': 'heatmap', 'start': 1750.036, 'weight': 1, 'content': [{'end': 1758.66, 'text': "And then we're going to say print and we're going to throw in a space and then we're going to end this with end is equal to and nothing.", 'start': 1750.036, 'duration': 8.624}, {'end': 1765.102, 'text': "And then to end our program altogether we're going to print out our stump and be done with it.", 'start': 1759.08, 'duration': 6.022}, {'end': 1767.207, 'text': "So let's save that inside of there.", 'start': 1765.626, 'duration': 1.581}, {'end': 1770.928, 'text': "As long as I don't have any silly errors anywhere, this should work perfectly.", 'start': 1767.267, 'duration': 3.661}, {'end': 1771.749, 'text': "Let's run it.", 'start': 1771.208, 'duration': 0.541}, {'end': 1776.35, 'text': "How tall is the tree? And let's say that it is five rows tall.", 'start': 1772.029, 'duration': 4.321}, {'end': 1778.211, 'text': 'And you can see that it printed it out there.', 'start': 1776.611, 'duration': 1.6}, {'end': 1781.633, 'text': "Don't like the fact that I went and forgot to put that inside of there.", 'start': 1778.591, 'duration': 3.042}, {'end': 1783.713, 'text': 'Again, a space for my input.', 'start': 1781.693, 'duration': 2.02}, {'end': 1786.255, 'text': "How tall is the tree? Let's shave it like that.", 'start': 1783.773, 'duration': 2.482}, {'end': 1787.775, 'text': "And let's run it again.", 'start': 1786.655, 'duration': 1.12}, {'end': 1790.456, 'text': 'How tall is the tree? And we can make it six.', 'start': 1788.315, 'duration': 2.141}, {'end': 1792.037, 'text': 'And you can see that it worked again.', 'start': 1790.796, 'duration': 1.241}, {'end': 1795.137, 'text': "And how tall is the tree? Let's go make it 10.", 'start': 1792.497, 'duration': 2.64}, {'end': 1796.898, 'text': 'And you can see that it worked once again.', 'start': 1795.137, 'duration': 1.761}, {'end': 1797.979, 'text': 'So there you go, guys.', 'start': 1796.918, 'duration': 1.061}, {'end': 1801.141, 'text': "I'm ramping up the problems, making them a little bit more complicated.", 'start': 1798.099, 'duration': 3.042}, {'end': 1804.323, 'text': "Don't worry if you don't get them all exactly right.", 'start': 1801.301, 'duration': 3.022}, {'end': 1806.725, 'text': "This is just a process we're going to go through.", 'start': 1804.523, 'duration': 2.202}, {'end': 1811.528, 'text': "And I'll progressively increase the complexities of the problems.", 'start': 1807.185, 'duration': 4.343}], 'summary': 'A program runs to print a tree of varying heights, progressing in complexity.', 'duration': 39.499, 'max_score': 1750.036, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/swQEbZ6ez1I/pics/swQEbZ6ez1I1750036.jpg'}], 'start': 1570.527, 'title': 'Pine tree printing algorithm and python tree building program', 'summary': 'Discusses creating a pine tree printing algorithm by calculating tree height, spaces, hashes, and stump spaces, and building a tree using a python program with while and for loops, resulting in successful output.', 'chapters': [{'end': 1631.552, 'start': 1570.527, 'title': 'Pine tree printing algorithm', 'summary': 'Discusses creating a pine tree printing algorithm by calculating tree height, spaces, hashes, and stump spaces based on research, with tree height being a key factor in determining spaces and stump spaces.', 'duration': 61.025, 'highlights': ['Calculating tree height and storing it as an integer is crucial for determining spaces and stump spaces, with spaces starting at tree height minus 1.', 'The number of spaces before the stump is essential and is calculated as tree height minus one.', 'Hashes always start at 1 when creating a tree.']}, {'end': 1822.455, 'start': 1631.872, 'title': 'Python tree building program', 'summary': 'Discusses building a tree using a python program with while and for loops, calculating spaces and hashes, and testing the program with different tree heights, resulting in successful output.', 'duration': 190.583, 'highlights': ['The program successfully builds a tree using Python with while and for loops, calculating spaces and hashes. The program uses while and for loops to calculate the number of spaces and hashes required to build a tree.', 'The program is tested with tree heights of 5, 6, and 10, resulting in successful output each time. The program is successfully tested with tree heights of 5, 6, and 10, displaying the correct tree structure.', 'The chapter encourages learning through progressively increasing the complexities of the problems and invites questions and comments from the audience. The chapter encourages progressive learning by increasing the complexity of the problems and invites audience participation by requesting questions and comments.']}], 'duration': 251.928, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/swQEbZ6ez1I/pics/swQEbZ6ez1I1570527.jpg', 'highlights': ['The program successfully builds a tree using Python with while and for loops, calculating spaces and hashes.', 'The program is tested with tree heights of 5, 6, and 10, resulting in successful output each time.', 'The number of spaces before the stump is essential and is calculated as tree height minus one.', 'The chapter encourages progressive learning by increasing the complexity of the problems and invites audience participation by requesting questions and comments.']}], 'highlights': ['The program demonstrates compounding interest by allowing the user to input their investment amount and expected interest earned each year, then calculating the earnings after a 10 year period.', 'The program prompts for the money invested and interest rate, converting them to float for further calculations.', "The program involves converting the user's input to float values and rounding the percentage rate by two digits to enable accurate calculations.", 'The chapter provides a clear example of cycling through even numbers and printing out the values.', 'The program will utilize one while loop and three for loops to achieve the desired output, providing a helpful guide while acknowledging there are multiple ways to accomplish this task.']}