Pratique du Shadowing: 3.3k - Apprendre l'anglais à l'oral avec la vidéo

Création de la leçon...
1
Hey everyone, I'm Bull and I'm here to serve you today's slice of pie.
2
Today's topic is list comprehension.
3
So let me give you a scenario.
4
Let's say you have a long list of numbers here called nums
5
and what you want to do is get all the even numbers from this list and put them into this evens list.
6
If you have no knowledge of list comprehension, you may want to do something like this where you create a for loop and say for num in nums.
7
So for each for loop iteration, we take an item from this nums list and assign it to num.
8
Then in here, we need to check if that particular num is even or not.
9
We can do this with the modulus operator.
10
So let's say num percent two.
11
This percent sign is the modulus operator.
12
What this is doing is saying if I divide num by two, what will the remainder be?
13
So for every possible whole number, if you do a modulus of that number, you will only ever get a zero or a one.
14
Even numbers divided by two give you a zero as a remainder and odd numbers give you a one.
15
So if num modulus two is equal to 0, we know that particular number is even.
16
So in here, let's add it to our evens list.
17
So we can just do evens.append num.
18
And that's it.
19
Down here, let's print our evens list, and this should work as expected.
20
Okay, but list comprehension can do all of this logic in a much cleaner pythonic way.
21
So I'll erase this, and instead, in this evens list, I'll say num for num in nums.
22
So this is basically just taking each num in our nums list and placing it here in this evens list.
23
But this isn't what we want.
24
We're only wanting the even numbers.
25
Well, we can add some additional logic here at the end to fix this.
26
Let's say num for num in nums if that particular num, modulus 2, is equal to 0.
27
Now we should have every even number placed in this evens list.
28
So let's run this, and there we go.
29
Pretty cool, right?
30
Be sure to leave a like if you found this helpful.

About This Lesson

In today’s lesson, you will explore the concept of list comprehension in Python programming through a practical example. The instructor demonstrates how to extract even numbers from a list using traditional for loops and then presents a more efficient and cleaner method using list comprehension. This technique not only enhances your programming skills but also aids in understanding English through technical discussions. As you follow along, you’ll practice not only identifying key programming concepts but also refining your English listening and speaking abilities by engaging with the content.

Key Vocabulary & Phrases

  • List comprehension: A concise way to create lists in Python.
  • Even numbers: Whole numbers that can be divided by two without a remainder.
  • Modulus operator: A mathematical operator (%) that returns the remainder of a division.
  • For loop: A control flow statement for iterating over a sequence.
  • Append: A method to add an element to the end of a list in Python.
  • Remainder: What is left over after division. In programming, this concept helps identify even and odd numbers.
  • Pythonic way: A philosophy in writing Python code that emphasizes readability and simplicity.

Practice Tips

When practicing the concepts from this video, consider implementing a technique known as shadowspeak. This involves repeating sentences or phrases immediately after hearing them in the video to improve pronunciation and rhythm. Given that the instructor speaks clearly and at a moderate pace, this is an excellent opportunity for you to implement this method using a shadowing app or through a dedicated shadowing site.

Start by pausing the video at the end of key sentences and repeating them aloud. Focus on mimicking the instructor's tone and pace to enhance your speaking fluency. As the lesson discusses specific examples, practice summarizing those examples in your words, which will help reinforce both your programming vocabulary and everyday English use. Be sure to pay attention to the transitions between thoughts, which can be mimicked to provide a more natural flow to your speech. This method will not only help you learn English with YouTube as a valuable resource but will also improve your overall communication skills!

Qu'est-ce que la technique du Shadowing ?

Le Shadowing est une technique d'apprentissage des langues fondée sur la science, développée à l'origine pour la formation des interprètes professionnels. Le principe est simple mais puissant : vous écoutez de l'anglais natif et le répétez immédiatement à voix haute — comme une ombre suivant le locuteur avec un décalage de 1 à 2 secondes. Les recherches montrent une amélioration significative de la précision de la prononciation, de l'intonation, du rythme, des liaisons, de la compréhension orale et de la fluidité.