title
Learn Python Programming - 20 - For Loops
description
Code Notes -- https://repl.it/DxSL/4
Exercises and Resources -- https://cleverprogrammer.com?utm_source=youtube&utm_medium=yt-description
Let's talk about for loops and why they are so important! Anything that requires repetition... For loops are your friends! ...
...
★☆★ FREE Lesson 1: The Most Important Thing For a Successful Programmer★☆★
https://www.cleverprogrammer.com/blog/lesson-1-the-most-important-thing-for-a-successful-programmer
Enroll for coding exercises, projects, tutorials, and courses...
https://cleverprogrammer.com?utm_source=youtube&utm_medium=yt-description ------------------------------------
Clever Programmer
Website ► https://cleverprogrammer.com?utm_source=youtube&utm_medium=yt-description
Facebook ► http://cleverprogrammer.io/facebook
Twitter ► http://cleverprogrammer.io/twitter
Instagram ► http://cleverprogrammer.io/instagram
Snapchat ► Rafeh1
iTunes Podcast ► http://cleverprogrammer.io/podcast
Google Podcast ► http://cleverprogrammer.io/google-podcast
Support (Patreon) ► http://cleverprogrammer.io/patreon
Youtube ► https://www.youtube.com/c/CleverProgrammer
Github (Code) ► http://cleverprogrammer.io/github Biz / Sponsorships 👉 https://www.cleverprogrammer.com/partnerships
detail
{'title': 'Learn Python Programming - 20 - For Loops', 'heatmap': [{'end': 811.343, 'start': 779.199, 'weight': 0.92}, {'end': 1228.238, 'start': 1212.828, 'weight': 0.753}], 'summary': 'Covers understanding for loops, python loop concepts, the range function, exercises for printing numbers and creating functions, and a sum list function for summing list elements, emphasizing the importance of testing code and the role of assertions in ensuring code functionality.', 'chapters': [{'end': 42.418, 'segs': [{'end': 32.918, 'src': 'embed', 'start': 0.029, 'weight': 0, 'content': [{'end': 2.511, 'text': "hey guys, what's up in this video?", 'start': 0.029, 'duration': 2.482}, {'end': 5.893, 'text': 'i want to talk about for loops and how they work.', 'start': 2.511, 'duration': 3.382}, {'end': 8.375, 'text': "okay, so we're going to get into loops.", 'start': 5.893, 'duration': 2.482}, {'end': 14.31, 'text': 'you saw that we did a little bit a lot earlier in when we were using the turtle module.', 'start': 8.375, 'duration': 5.935}, {'end': 17.111, 'text': "So hopefully they're a little intuitive to you by now.", 'start': 14.39, 'duration': 2.721}, {'end': 21.213, 'text': "But now let's use them for more, I guess, realistic purposes.", 'start': 17.671, 'duration': 3.542}, {'end': 27.115, 'text': 'Right Things to do with numbers and manipulation of data.', 'start': 21.333, 'duration': 5.782}, {'end': 32.918, 'text': 'So not only can you use it for visual graphics, but you can use it for anything now.', 'start': 27.556, 'duration': 5.362}], 'summary': 'Discussion on for loops for data manipulation and practical applications.', 'duration': 32.889, 'max_score': 0.029, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/fBIvTEOTzvs/pics/fBIvTEOTzvs29.jpg'}], 'start': 0.029, 'title': 'Understanding for loops', 'summary': 'Discusses the usage of for loops for realistic purposes, such as manipulating data and working with numbers, enabling the creation of games and scripts.', 'chapters': [{'end': 42.418, 'start': 0.029, 'title': 'Understanding for loops', 'summary': 'Discusses the usage of for loops for realistic purposes, such as manipulating data and working with numbers, enabling the creation of games and scripts.', 'duration': 42.389, 'highlights': ['For loops are discussed for realistic purposes like manipulating data and working with numbers, enabling the creation of games and scripts.', 'The chapter also mentions the prior usage of for loops with the turtle module for visual graphics.', 'The video aims to teach the audience about the versatility of for loops beyond visual graphics, catering to realistic purposes.']}], 'duration': 42.389, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/fBIvTEOTzvs/pics/fBIvTEOTzvs29.jpg', 'highlights': ['For loops enable the creation of games and scripts.', 'The chapter discusses the prior usage of for loops with the turtle module for visual graphics.', 'The video aims to teach the audience about the versatility of for loops beyond visual graphics.']}, {'end': 360.385, 'segs': [{'end': 118.349, 'src': 'embed', 'start': 43.772, 'weight': 0, 'content': [{'end': 52.677, 'text': "Whatever is the case, you're going to become more familiar with loops and it's going to help you do a lot of powerful things, okay?", 'start': 43.772, 'duration': 8.905}, {'end': 55.439, 'text': "So let's get started how loops work.", 'start': 53.218, 'duration': 2.221}, {'end': 59.001, 'text': "Essentially, it's a way of doing something multiple times.", 'start': 55.519, 'duration': 3.482}, {'end': 63.964, 'text': 'Whenever you think hmm, I need this done a lot of times.', 'start': 59.061, 'duration': 4.903}, {'end': 64.924, 'text': 'what can I do?', 'start': 63.964, 'duration': 0.96}, {'end': 72.609, 'text': "For example, if somebody told you print out numbers from one to two, you'll be like okay, I'll just write print one and print two.", 'start': 65.104, 'duration': 7.505}, {'end': 79.17, 'text': 'Good, But now what if that same person told you print numbers from one through 10?', 'start': 74.025, 'duration': 5.145}, {'end': 85.917, 'text': "You'll say okay, I'll just write print one, print two, print three, print four, print five, all up to print 10..", 'start': 79.17, 'duration': 6.747}, {'end': 88.96, 'text': "Whew, a lot of typing, but hey, it wasn't so bad.", 'start': 85.917, 'duration': 3.043}, {'end': 96.869, 'text': "Now let's say I tell you to print up to 1, 000.", 'start': 90.482, 'duration': 6.387}, {'end': 99.291, 'text': 'Could you type that? Of course you can.', 'start': 96.869, 'duration': 2.422}, {'end': 102.854, 'text': 'Would it take you maybe two hours, three hours? Maybe.', 'start': 99.852, 'duration': 3.002}, {'end': 104.856, 'text': "You'll copy paste, you'll do tricks.", 'start': 103.215, 'duration': 1.641}, {'end': 106.738, 'text': "It'll be harder.", 'start': 105.677, 'duration': 1.061}, {'end': 110.341, 'text': "Now, if I tell you to type in a million, it's gonna get much, much, much harder, okay?", 'start': 106.758, 'duration': 3.583}, {'end': 114.685, 'text': 'So for loop helps us overcome the burden of doing repetitive tasks.', 'start': 110.361, 'duration': 4.324}, {'end': 118.349, 'text': "So let's try something, okay?", 'start': 115.808, 'duration': 2.541}], 'summary': 'Understanding loops helps do repetitive tasks more efficiently and effectively.', 'duration': 74.577, 'max_score': 43.772, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/fBIvTEOTzvs/pics/fBIvTEOTzvs43772.jpg'}, {'end': 212.891, 'src': 'embed', 'start': 188.41, 'weight': 3, 'content': [{'end': 196.597, 'text': "What we need to do is break this down one line at a time if we need to look at it more introspectively and see what's going on.", 'start': 188.41, 'duration': 8.187}, {'end': 200.32, 'text': "So what is range of five? Well, let's check it out.", 'start': 197.418, 'duration': 2.902}, {'end': 202.002, 'text': "Let's see what range of five is.", 'start': 200.401, 'duration': 1.601}, {'end': 203.703, 'text': "So I'm going to print this out.", 'start': 202.262, 'duration': 1.441}, {'end': 212.891, 'text': 'Range of five is really a list of numbers from zero through four, okay? So to use loops, you need to know what a list is.', 'start': 204.604, 'duration': 8.287}], 'summary': 'Understanding the range of five as a list of numbers from 0 to 4 is essential for using loops.', 'duration': 24.481, 'max_score': 188.41, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/fBIvTEOTzvs/pics/fBIvTEOTzvs188410.jpg'}, {'end': 360.385, 'src': 'embed', 'start': 329.78, 'weight': 4, 'content': [{'end': 337.426, 'text': "So my suggestion to you, especially if you're starting out with programming, never, ever use one letter variables.", 'start': 329.78, 'duration': 7.646}, {'end': 343.932, 'text': "Never OK, so even if you think you can use an I here or an X or Y, don't do it.", 'start': 338.007, 'duration': 5.925}, {'end': 349.615, 'text': 'Take your time and pick better variable names.', 'start': 346.072, 'duration': 3.543}, {'end': 354.78, 'text': "So I'm gonna change this with number because number is that variable.", 'start': 350.036, 'duration': 4.744}, {'end': 357.282, 'text': 'This variable we created on the fly.', 'start': 354.94, 'duration': 2.342}, {'end': 360.385, 'text': "And I'm gonna say from zero through four.", 'start': 357.302, 'duration': 3.083}], 'summary': 'Avoid using one-letter variables when starting out with programming to improve readability and understanding.', 'duration': 30.605, 'max_score': 329.78, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/fBIvTEOTzvs/pics/fBIvTEOTzvs329780.jpg'}], 'start': 43.772, 'title': 'Python loops and their power', 'summary': "Covers the concept of loops in python, demonstrating their ability to simplify repetitive tasks and illustrating the iterative nature of the range function. it includes examples of printing numbers and 'hello' multiple times to highlight their power and challenges.", 'chapters': [{'end': 118.349, 'start': 43.772, 'title': 'Understanding loops and their power', 'summary': 'Introduces the concept of loops, illustrating their ability to simplify repetitive tasks, such as printing numbers, with examples of printing numbers from one to ten and the challenges involved in printing a million numbers.', 'duration': 74.577, 'highlights': ['Loops are a powerful tool for simplifying repetitive tasks, such as printing numbers, by executing a set of instructions multiple times.', 'Illustration of printing numbers from one to ten showcases the burden and challenges of manually typing repetitive tasks, setting the stage for the need for loops.', 'The example of printing up to a million numbers emphasizes the increasing difficulty and time consumption of repetitive tasks, highlighting the necessity of using loops for efficiency.']}, {'end': 360.385, 'start': 118.589, 'title': 'Understanding python loops and range', 'summary': "Explains the concept of loops and range in python, emphasizing the iterative nature of the range function and the importance of selecting meaningful variable names, illustrated through an example of printing 'hello' multiple times.", 'duration': 241.796, 'highlights': ['The range of five in Python evaluates to a list of numbers from zero through four, demonstrating the iterative nature of the range function and its output, providing a clear understanding for beginners. (relevance score: 5)', "The explanation of the 'I' variable in the context of the code, showcasing the iterative progression and printing of numbers from zero to four, highlighting the significance of variable naming and the recommendation to avoid using one-letter variables. (relevance score: 4)", "The emphasis on selecting meaningful variable names, such as using 'number' instead of 'I', to enhance readability and comprehension, serving as a valuable practice for beginners in programming. (relevance score: 3)"]}], 'duration': 316.613, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/fBIvTEOTzvs/pics/fBIvTEOTzvs43772.jpg', 'highlights': ['Loops are a powerful tool for simplifying repetitive tasks, such as printing numbers, by executing a set of instructions multiple times.', 'Illustration of printing numbers from one to ten showcases the burden and challenges of manually typing repetitive tasks, setting the stage for the need for loops.', 'The example of printing up to a million numbers emphasizes the increasing difficulty and time consumption of repetitive tasks, highlighting the necessity of using loops for efficiency.', 'The range of five in Python evaluates to a list of numbers from zero through four, demonstrating the iterative nature of the range function and its output, providing a clear understanding for beginners.', "The explanation of the 'I' variable in the context of the code, showcasing the iterative progression and printing of numbers from zero to four, highlighting the significance of variable naming and the recommendation to avoid using one-letter variables.", "The emphasis on selecting meaningful variable names, such as using 'number' instead of 'I', to enhance readability and comprehension, serving as a valuable practice for beginners in programming."]}, {'end': 512.52, 'segs': [{'end': 392.84, 'src': 'embed', 'start': 360.825, 'weight': 0, 'content': [{'end': 363.688, 'text': 'Now let me tell you something about the range function in Python.', 'start': 360.825, 'duration': 2.863}, {'end': 372.422, 'text': "The range function takes start and stop, okay? But it's kind of like this, if you have to think about it mathematically.", 'start': 363.708, 'duration': 8.714}, {'end': 380.089, 'text': 'It includes this point, which is why I put this here, and it goes up to, but does not include the stop, okay?', 'start': 372.882, 'duration': 7.207}, {'end': 384.092, 'text': 'So the range function takes into arguments start and stop.', 'start': 380.789, 'duration': 3.303}, {'end': 392.84, 'text': "So if I gave it one, or let's say I gave it zero, and let's say I gave it 10, you get back, let's just do two, because I'm lazy.", 'start': 384.592, 'duration': 8.248}], 'summary': 'The range function in python takes start and stop arguments, returning a sequence up to, but not including the stop value.', 'duration': 32.015, 'max_score': 360.825, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/fBIvTEOTzvs/pics/fBIvTEOTzvs360825.jpg'}, {'end': 512.52, 'src': 'embed', 'start': 486.639, 'weight': 2, 'content': [{'end': 491.565, 'text': "You can look at me write code all day long, you're not gonna get better because of that.", 'start': 486.639, 'duration': 4.926}, {'end': 494.168, 'text': 'You need to do it on your own no matter how simple it is.', 'start': 491.645, 'duration': 2.523}, {'end': 505.337, 'text': "And while Codecademy and all those things are great, they handhold you quite a bit, which means that you're not really learning a lot of those things.", 'start': 494.888, 'duration': 10.449}, {'end': 512.52, 'text': "okay. so we're gonna take a break from a lot of these tutorials and do exercises.", 'start': 505.337, 'duration': 7.183}], 'summary': 'Practice coding independently, as tutorials may limit learning. more exercises needed.', 'duration': 25.881, 'max_score': 486.639, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/fBIvTEOTzvs/pics/fBIvTEOTzvs486639.jpg'}], 'start': 360.825, 'title': 'Python range function', 'summary': 'Explains the range function in python, demonstrating its generation of a sequence of numbers within a specified range, and emphasizes the importance of exercises for effective learning and improvement in programming.', 'chapters': [{'end': 512.52, 'start': 360.825, 'title': 'Understanding the python range function', 'summary': 'Explains the range function in python, demonstrating how it generates a sequence of numbers between a specified range, and emphasizes the importance of exercises for effective learning and improvement in programming.', 'duration': 151.695, 'highlights': ['The range function in Python generates a sequence of numbers between a specified range, including the start but excluding the stop, for instance, from 20 to 40, and is useful for efficient list generation.', 'The instructor emphasizes the significance of exercises in learning programming, highlighting the importance of practice and independent coding for improvement and skill development.', 'The chapter provides insights into the structure and functionality of the range function in Python, showcasing its capability to generate a sequence of numbers between specified ranges and its application for efficient list generation.']}], 'duration': 151.695, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/fBIvTEOTzvs/pics/fBIvTEOTzvs360825.jpg', 'highlights': ['The range function in Python generates a sequence of numbers between a specified range, including the start but excluding the stop, for instance, from 20 to 40, and is useful for efficient list generation.', 'The chapter provides insights into the structure and functionality of the range function in Python, showcasing its capability to generate a sequence of numbers between specified ranges and its application for efficient list generation.', 'The instructor emphasizes the significance of exercises in learning programming, highlighting the importance of practice and independent coding for improvement and skill development.']}, {'end': 892.794, 'segs': [{'end': 561.654, 'src': 'embed', 'start': 538.516, 'weight': 3, 'content': [{'end': 549.89, 'text': 'Including 40, aha, right? Or rather I can say through to 41 and I can say excluding 41.', 'start': 538.516, 'duration': 11.374}, {'end': 553.631, 'text': "That's probably a better way for me to write it because that's how Python thinks of it.", 'start': 549.89, 'duration': 3.741}, {'end': 556.052, 'text': "Okay, now let's do an exercise.", 'start': 554.372, 'duration': 1.68}, {'end': 561.654, 'text': "Let's say that we take numbers from a list, sum them up and return them.", 'start': 556.612, 'duration': 5.042}], 'summary': 'Utilizing numbers from a list to perform summation and return the result.', 'duration': 23.138, 'max_score': 538.516, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/fBIvTEOTzvs/pics/fBIvTEOTzvs538516.jpg'}, {'end': 640.878, 'src': 'embed', 'start': 587.906, 'weight': 0, 'content': [{'end': 595.571, 'text': "So first let's just write something using a for loop that sums up all the numbers in the list and then returns them back to us,", 'start': 587.906, 'duration': 7.665}, {'end': 597.433, 'text': 'or prints them out back to us.', 'start': 595.571, 'duration': 1.862}, {'end': 598.834, 'text': "So let's do this.", 'start': 598.053, 'duration': 0.781}, {'end': 601.296, 'text': "Let's say count is equal to zero.", 'start': 598.914, 'duration': 2.382}, {'end': 607.179, 'text': "So we're gonna use some variable to keep track of every number.", 'start': 601.996, 'duration': 5.183}, {'end': 616.544, 'text': 'so essentially then we can say that if, when we go through the loop, we can say okay, i want you to add one to count,', 'start': 607.179, 'duration': 9.365}, {'end': 620.986, 'text': 'then when i want to go through the loop again, i want to, i want to say add two to count.', 'start': 616.544, 'duration': 4.442}, {'end': 624.308, 'text': 'then when i go through the loop again, i want to say add three to count.', 'start': 620.986, 'duration': 3.322}, {'end': 631.87, 'text': "okay, and so in the start you'll have, uh, count being one, then you'll have it being one plus two, so three,", 'start': 624.983, 'duration': 6.887}, {'end': 634.832, 'text': "and then you'll have it being two plus three, so six.", 'start': 631.87, 'duration': 2.962}, {'end': 639.617, 'text': 'so you should get you know, um, back six.', 'start': 634.832, 'duration': 4.785}, {'end': 640.878, 'text': "so let's try it.", 'start': 639.617, 'duration': 1.261}], 'summary': 'Using a for loop to sum up numbers, the result is 6', 'duration': 52.972, 'max_score': 587.906, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/fBIvTEOTzvs/pics/fBIvTEOTzvs587906.jpg'}, {'end': 811.343, 'src': 'embed', 'start': 779.199, 'weight': 1, 'content': [{'end': 783.68, 'text': "And once we're done running through this entire loop, we print out count.", 'start': 779.199, 'duration': 4.481}, {'end': 787.242, 'text': 'it should be in our in this case, six.', 'start': 783.68, 'duration': 3.562}, {'end': 788.562, 'text': "So let's check it.", 'start': 787.942, 'duration': 0.62}, {'end': 793.92, 'text': 'Okay, and you can see that count does indeed give us back a six.', 'start': 789.918, 'duration': 4.002}, {'end': 800.023, 'text': "Well, that's great that we wrote a for loop that runs for the numbers one, two, and three.", 'start': 794.96, 'duration': 5.063}, {'end': 811.343, 'text': 'What if we wanna write this for loop and we want it to run Right, we want it to run and sum up lists for any list given to it, any size list.', 'start': 800.423, 'duration': 10.92}], 'summary': 'A for loop in the transcript runs for numbers one, two, and three, yielding a count of six.', 'duration': 32.144, 'max_score': 779.199, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/fBIvTEOTzvs/pics/fBIvTEOTzvs779199.jpg'}, {'end': 811.343, 'src': 'heatmap', 'start': 779.199, 'weight': 0.92, 'content': [{'end': 783.68, 'text': "And once we're done running through this entire loop, we print out count.", 'start': 779.199, 'duration': 4.481}, {'end': 787.242, 'text': 'it should be in our in this case, six.', 'start': 783.68, 'duration': 3.562}, {'end': 788.562, 'text': "So let's check it.", 'start': 787.942, 'duration': 0.62}, {'end': 793.92, 'text': 'Okay, and you can see that count does indeed give us back a six.', 'start': 789.918, 'duration': 4.002}, {'end': 800.023, 'text': "Well, that's great that we wrote a for loop that runs for the numbers one, two, and three.", 'start': 794.96, 'duration': 5.063}, {'end': 811.343, 'text': 'What if we wanna write this for loop and we want it to run Right, we want it to run and sum up lists for any list given to it, any size list.', 'start': 800.423, 'duration': 10.92}], 'summary': 'A for loop successfully sums up a list of any size, with an example resulting in a count of six.', 'duration': 32.144, 'max_score': 779.199, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/fBIvTEOTzvs/pics/fBIvTEOTzvs779199.jpg'}, {'end': 870.3, 'src': 'embed', 'start': 828.226, 'weight': 6, 'content': [{'end': 830.429, 'text': "That's how Jordan Belfort says it, right?", 'start': 828.226, 'duration': 2.203}, {'end': 838.281, 'text': 'The guy in Wolf of Wall Street, the movie, the person who Wolf of Wall Street was based on.', 'start': 830.469, 'duration': 7.812}, {'end': 843.008, 'text': 'He defines two concepts, conscious competence and unconscious competence.', 'start': 839.663, 'duration': 3.345}, {'end': 849.102, 'text': 'What is conscious competence? You thinking about something and then being good at it.', 'start': 843.128, 'duration': 5.974}, {'end': 850.844, 'text': "What's in conscious competence??", 'start': 849.362, 'duration': 1.482}, {'end': 856.289, 'text': "You get so damn good at what you do that you don't even have to think about it, and you do it okay?", 'start': 850.924, 'duration': 5.365}, {'end': 858.871, 'text': 'So how do we go from conscious competence?', 'start': 856.709, 'duration': 2.162}, {'end': 861.613, 'text': 'you, looking at your notes, you really thinking about it.', 'start': 858.871, 'duration': 2.742}, {'end': 864.936, 'text': 'and how does a function work to, like you, just writing code?', 'start': 861.613, 'duration': 3.323}, {'end': 868.099, 'text': 'is practice okay?', 'start': 865.877, 'duration': 2.222}, {'end': 870.3, 'text': "There's no substitution for that.", 'start': 868.539, 'duration': 1.761}], 'summary': 'Jordan belfort discusses conscious competence and unconscious competence in achieving mastery through practice.', 'duration': 42.074, 'max_score': 828.226, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/fBIvTEOTzvs/pics/fBIvTEOTzvs828226.jpg'}], 'start': 512.52, 'title': 'Python exercises, functions, and loop efficiency', 'summary': 'Covers python exercises for printing numbers, summing up lists, and creating functions, as well as incrementing count in a loop with a specific example resulting in a final count of six. it also emphasizes the importance of hands-on practice for achieving unconscious competence, illustrated by the concept of conscious and unconscious competence defined by jordan belfort from the wolf of wall street.', 'chapters': [{'end': 674.785, 'start': 512.52, 'title': 'Python exercises and functions', 'summary': 'Covers an exercise on printing numbers, summing up a list of numbers, and creating a function to perform the task, using a for loop and variable manipulation.', 'duration': 162.265, 'highlights': ['The chapter demonstrates an exercise of printing numbers from 20 through 40, explaining the range and exclusion in Python, providing a practical coding example.', 'It explains the process of summing up a list of numbers using a for loop and variable manipulation, illustrating the concept with a practical coding example.', 'The chapter discusses creating a function to perform the task of summing up a list of numbers, emphasizing the use of a for loop and variable manipulation.']}, {'end': 800.023, 'start': 674.785, 'title': 'Incrementing count in a loop', 'summary': 'Explains how to increment a count variable within a loop in python, using a specific example where the count is incremented by the value of the number variable in each iteration, resulting in a final count of six.', 'duration': 125.238, 'highlights': ['The new count is calculated by adding the old count to the number variable in each iteration, resulting in a final count of six after looping through numbers one, two, and three.', 'The count is initially set to zero and is then updated in each iteration by adding the value of the number variable, resulting in a final count of six.', 'The loop iterates through numbers one, two, and three, and the count is incremented accordingly, resulting in a final count of six.']}, {'end': 892.794, 'start': 800.423, 'title': 'Efficiency of practice for mastery', 'summary': 'Emphasizes the importance of practice for achieving unconscious competence, as exemplified by the concept of conscious and unconscious competence defined by jordan belfort from the wolf of wall street. it stresses the necessity of hard work and hands-on experience in mastering skills, rather than relying solely on passive learning methods.', 'duration': 92.371, 'highlights': ['The chapter stresses the necessity of hard work and hands-on experience in mastering skills, rather than relying solely on passive learning methods. It emphasizes the importance of practice for achieving unconscious competence and highlights the ineffectiveness of solely relying on passive learning methods.', 'The concept of conscious and unconscious competence is defined by Jordan Belfort from the Wolf of Wall Street, emphasizing the importance of practice for achieving mastery. Jordan Belfort defines conscious and unconscious competence, illustrating the significance of practice in achieving mastery and skill proficiency.', 'The chapter emphasizes the importance of practice for achieving unconscious competence, as exemplified by the concept of conscious and unconscious competence. It highlights the significance of practice in achieving unconscious competence and the transition from conscious competence through diligent practice.']}], 'duration': 380.274, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/fBIvTEOTzvs/pics/fBIvTEOTzvs512520.jpg', 'highlights': ['The new count is calculated by adding the old count to the number variable in each iteration, resulting in a final count of six after looping through numbers one, two, and three.', 'The loop iterates through numbers one, two, and three, and the count is incremented accordingly, resulting in a final count of six.', 'The count is initially set to zero and is then updated in each iteration by adding the value of the number variable, resulting in a final count of six.', 'The chapter demonstrates an exercise of printing numbers from 20 through 40, explaining the range and exclusion in Python, providing a practical coding example.', 'It explains the process of summing up a list of numbers using a for loop and variable manipulation, illustrating the concept with a practical coding example.', 'The chapter discusses creating a function to perform the task of summing up a list of numbers, emphasizing the use of a for loop and variable manipulation.', 'The chapter stresses the necessity of hard work and hands-on experience in mastering skills, rather than relying solely on passive learning methods. It emphasizes the importance of practice for achieving unconscious competence and highlights the ineffectiveness of solely relying on passive learning methods.', 'The concept of conscious and unconscious competence is defined by Jordan Belfort from the Wolf of Wall Street, emphasizing the importance of practice for achieving mastery. Jordan Belfort defines conscious and unconscious competence, illustrating the significance of practice in achieving mastery and skill proficiency.', 'The chapter emphasizes the importance of practice for achieving unconscious competence, as exemplified by the concept of conscious and unconscious competence. It highlights the significance of practice in achieving unconscious competence and the transition from conscious competence through diligent practice.']}, {'end': 1238.968, 'segs': [{'end': 924.459, 'src': 'embed', 'start': 892.874, 'weight': 0, 'content': [{'end': 897.902, 'text': "So let's write this function that can take in any size list and sum it up.", 'start': 892.874, 'duration': 5.028}, {'end': 901.444, 'text': "Okay, so I'm gonna say define function.", 'start': 898.543, 'duration': 2.901}, {'end': 903.546, 'text': "Okay, so let's just write a little note at the top.", 'start': 901.504, 'duration': 2.042}, {'end': 905.267, 'text': "So we know what we're doing.", 'start': 904.006, 'duration': 1.261}, {'end': 914.452, 'text': 'Write a function that sums, sums all elements of a list and returns them.', 'start': 906.247, 'duration': 8.205}, {'end': 916.454, 'text': "Okay, that's what this is doing.", 'start': 914.572, 'duration': 1.882}, {'end': 920.636, 'text': "That's what returns them.", 'start': 918.615, 'duration': 2.021}, {'end': 924.459, 'text': "Let's just put a little thing here like this.", 'start': 920.716, 'duration': 3.743}], 'summary': 'Function sums all elements of a list and returns them.', 'duration': 31.585, 'max_score': 892.874, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/fBIvTEOTzvs/pics/fBIvTEOTzvs892874.jpg'}, {'end': 981.688, 'src': 'embed', 'start': 951.256, 'weight': 2, 'content': [{'end': 952.497, 'text': 'Try to make it more descriptive.', 'start': 951.256, 'duration': 1.241}, {'end': 956.899, 'text': "So I'm assuming I'm gonna get a my list or a list as input.", 'start': 953.137, 'duration': 3.762}, {'end': 957.919, 'text': "So I'm gonna call it my list.", 'start': 956.919, 'duration': 1}, {'end': 960.941, 'text': "So I'm gonna hit enter now.", 'start': 959.92, 'duration': 1.021}, {'end': 965.323, 'text': "What's the next part, okay? Hmm, let's think about it.", 'start': 962.161, 'duration': 3.162}, {'end': 972.304, 'text': 'So the next part I wanna put here is I want to have a counter variable.', 'start': 965.483, 'duration': 6.821}, {'end': 975.805, 'text': "That's what we had when we were writing this for loop.", 'start': 972.764, 'duration': 3.041}, {'end': 981.688, 'text': "And I want to say for number in well, what's the list we're working with?", 'start': 976.205, 'duration': 5.483}], 'summary': 'Describing the process of inputting a list and setting up a counter variable for a for loop.', 'duration': 30.432, 'max_score': 951.256, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/fBIvTEOTzvs/pics/fBIvTEOTzvs951256.jpg'}, {'end': 1051.568, 'src': 'embed', 'start': 1022.804, 'weight': 5, 'content': [{'end': 1026.387, 'text': "For example, if I write an assertion that's false, it's gonna give me back false.", 'start': 1022.804, 'duration': 3.583}, {'end': 1030.392, 'text': 'So if I said five is equal to six, my code is gonna yell at me.', 'start': 1026.828, 'duration': 3.564}, {'end': 1034.877, 'text': "Hold on, I'm obviously having an error here, because I'm writing funky business.", 'start': 1030.613, 'duration': 4.264}, {'end': 1038.56, 'text': 'But you can see I get an assertion error.', 'start': 1035.637, 'duration': 2.923}, {'end': 1040.761, 'text': 'It goes, hey, five is not equal to six.', 'start': 1038.579, 'duration': 2.182}, {'end': 1043.463, 'text': 'But if I go, six is equal to six.', 'start': 1041.242, 'duration': 2.221}, {'end': 1048.146, 'text': 'you can see that assertion gives me nice little three here, right?', 'start': 1043.463, 'duration': 4.683}, {'end': 1051.568, 'text': 'Which is or sorry?', 'start': 1049.627, 'duration': 1.941}], 'summary': 'Demonstrates assertion error with false statement; correct assertion yields 3.', 'duration': 28.764, 'max_score': 1022.804, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/fBIvTEOTzvs/pics/fBIvTEOTzvs1022804.jpg'}, {'end': 1111.351, 'src': 'embed', 'start': 1066.058, 'weight': 1, 'content': [{'end': 1073.961, 'text': "It just gives me back no error when it works and it gives me a big, red, angry, scary looking error when it's wrong.", 'start': 1066.058, 'duration': 7.903}, {'end': 1080.884, 'text': "So I wanna have this assertion here and why this assertion will be helpful to me is it's gonna test my code.", 'start': 1074.561, 'duration': 6.323}, {'end': 1083.665, 'text': "Okay, let's have another assertion.", 'start': 1081.624, 'duration': 2.041}, {'end': 1087.839, 'text': "and let's say four.", 'start': 1086.858, 'duration': 0.981}, {'end': 1090.861, 'text': 'And this should give me back 10.', 'start': 1088.579, 'duration': 2.282}, {'end': 1093.203, 'text': "So I'm also teaching you guys how to test your code.", 'start': 1090.861, 'duration': 2.342}, {'end': 1103.625, 'text': 'So, once I write this function, you should be able to call the function by saying sum list, passing it any list, in this case this list one, two,', 'start': 1093.603, 'duration': 10.022}, {'end': 1106.447, 'text': 'three, and it should give you back a six, and it should give you back a 10..', 'start': 1103.625, 'duration': 2.822}, {'end': 1111.351, 'text': "When you run this code, if it doesn't give you an error, that means it's passed all of these test cases.", 'start': 1106.447, 'duration': 4.904}], 'summary': 'Teaching how to test code with assertions, passing test cases', 'duration': 45.293, 'max_score': 1066.058, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/fBIvTEOTzvs/pics/fBIvTEOTzvs1066058.jpg'}, {'end': 1238.968, 'src': 'heatmap', 'start': 1212.828, 'weight': 0.753, 'content': [{'end': 1215.689, 'text': 'so if I said one plus two plus three should not give you a six.', 'start': 1212.828, 'duration': 2.861}, {'end': 1218.772, 'text': "let's say I said give it, it should give me a seven.", 'start': 1215.689, 'duration': 3.083}, {'end': 1220.513, 'text': "you'll see that it gives me an assertion error.", 'start': 1218.772, 'duration': 1.741}, {'end': 1224.976, 'text': 'It says, hey, calling sum list on one, two, three does not give me a seven.', 'start': 1220.553, 'duration': 4.423}, {'end': 1228.238, 'text': "So it should give you back a six, okay? That's good.", 'start': 1225.756, 'duration': 2.482}, {'end': 1232.555, 'text': "And just for sanity check, let's run it and print something.", 'start': 1229.628, 'duration': 2.927}, {'end': 1233.998, 'text': "Let's say one, two.", 'start': 1232.996, 'duration': 1.002}, {'end': 1238.968, 'text': 'What should that give us? That should give us a four, right? Or sorry, three, one plus two.', 'start': 1234.559, 'duration': 4.409}], 'summary': 'Assert error: summing 1, 2, 3 does not result in 7.', 'duration': 26.14, 'max_score': 1212.828, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/fBIvTEOTzvs/pics/fBIvTEOTzvs1212828.jpg'}], 'start': 892.874, 'title': 'Summing function and assertions in testing', 'summary': "Covers the process of defining a 'sum list' function for summing list elements and explains the concept of assertions and testing through an example, emphasizing the importance of testing code and the role of assertions in ensuring code functionality.", 'chapters': [{'end': 994.532, 'start': 892.874, 'title': 'Summing function for lists', 'summary': "Explains the process of defining a function called 'sum list' that takes in a list as an argument and sums all its elements using a for loop.", 'duration': 101.658, 'highlights': ["The function 'sum list' is defined to take in one argument, 'my list', and is designed to sum all elements of the input list.", "The chapter emphasizes the importance of using descriptive variable names, such as 'my list', instead of one-letter variables like 'A', 'B', 'C', 'X', or 'Z'.", 'A counter variable is introduced to iterate through the list using a for loop in order to sum its elements.']}, {'end': 1238.968, 'start': 995.233, 'title': 'Understanding assertions in testing', 'summary': 'Explains the concept of assertions and testing through an example of creating a function to sum a list of numbers and using assertions to verify the output, highlighting the importance of testing code and the role of assertions in identifying errors and ensuring code functionality.', 'duration': 243.735, 'highlights': ['Assertions are used to test code by verifying expected outputs, helping in identifying errors and ensuring code functionality. The chapter explains the concept of assertions and testing through an example of creating a function to sum a list of numbers and using assertions to verify the output, highlighting the importance of testing code and the role of assertions in identifying errors and ensuring code functionality.', 'The function is designed to sum a list of numbers and return the total count, allowing for testing different cases. The function is designed to sum a list of numbers and return the total count, allowing for testing different cases.', 'Using assertions to compare the expected output with the actual output helps in identifying errors and ensuring the correctness of the code. Using assertions to compare the expected output with the actual output helps in identifying errors and ensuring the correctness of the code.']}], 'duration': 346.094, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/fBIvTEOTzvs/pics/fBIvTEOTzvs892874.jpg', 'highlights': ["The function 'sum list' is defined to take in one argument, 'my list', and is designed to sum all elements of the input list.", 'Assertions are used to test code by verifying expected outputs, helping in identifying errors and ensuring code functionality.', "The chapter emphasizes the importance of using descriptive variable names, such as 'my list', instead of one-letter variables like 'A', 'B', 'C', 'X', or 'Z'.", 'A counter variable is introduced to iterate through the list using a for loop in order to sum its elements.', 'The function is designed to sum a list of numbers and return the total count, allowing for testing different cases.', 'Using assertions to compare the expected output with the actual output helps in identifying errors and ensuring the correctness of the code.']}], 'highlights': ['Loops are a powerful tool for simplifying repetitive tasks, such as printing numbers, by executing a set of instructions multiple times.', 'The range function in Python generates a sequence of numbers between a specified range, including the start but excluding the stop, for instance, from 20 to 40, and is useful for efficient list generation.', "The function 'sum list' is defined to take in one argument, 'my list', and is designed to sum all elements of the input list.", 'Assertions are used to test code by verifying expected outputs, helping in identifying errors and ensuring code functionality.', 'The chapter discusses creating a function to perform the task of summing up a list of numbers, emphasizing the use of a for loop and variable manipulation.']}