Shadowing Practice: Python Tutorial for Beginners 1: Install and Setup for Mac and Windows - Learn English Speaking with Video

בחר מצב תרגול

כל מצב פותח חדר תרגול במסך מלא.

221 משפטים
אם המשפטים קצרים או ארוכים מדי, לחץ על ערוך כדי להתאים אותם.
1
Hey there, how's it going everybody?
2
In this series of videos we'll be going over the basics of Python programming.
3
Now I get a lot of messages from people who say that they enjoy my Python videos, but that they're either just getting started out in programming
4
or coming from another language and would like a beginner's overview of Python
5
so that they can better understand the more advanced topics.
6
And that's what we're going to do here.
7
We're going to cover how to get up and running with Python, how to work with the different data types, how to work with conditionals and loops and iterations,
8
how to create functions, also importing modules and working with the standard library.
9
So basically everything that you need to know in order to have a firm understanding of the Python fundamentals.
10
Now one thing I do want to point out is
11
that throughout these tutorials I'm going to go over a few topics
12
that I've already made more detailed videos about and anytime
13
that happens I'll touch on the basics of that topic
14
but then reference the more detailed video if you'd like to see more examples
15
and that will allow us to move along at a good pace.
16
So let's go ahead and get started.
17
So first we're going to learn how to install Python and set up our development environment.
18
And we're going to look at how to do this on both Mac and Windows.
19
And this is pretty straightforward process.
20
So first we'll look at how to do this on a Mac.
21
But if you're on a Windows machine, then you can look in the description section below.
22
And I'll put a link to the timestamp where we start the installation for Windows.
23
And that way you can skip ahead if you want.
24
Or if you already have Python installed for your operating system, then I'll also put a link to the timestamp where both of these installations are complete
25
so that you can skip to where we're ready to write some code.
26
So for a Mac, Python usually comes pre-installed.
27
To check if Python is pre-installed, then we can just open up our terminal.
28
And within our terminal, we can say python-version.
29
Now we can see here that the default Python is Python 2.7.
30
Now it used to be more controversial as to which version you want to use, but almost everyone is moving over to Python 3.
31
And if you're learning Python, then you're definitely going to want to go with Python 3 unless you have a really good reason to do otherwise.
32
So let's go ahead and install the latest version of Python 3.
33
So to do this, we're just going to pull up an internet browser, and we're going to go to the Python website, which is here at python.org.
34
And from here, we can go to Downloads, and we can see that it already detected that we're on a Mac
35
and has offered up either Python 3 or Python 2.
36
And we want to go with the latest version, Python 3.6.
37
So that's going to download a PKG file, and we will click on this to go ahead and start the installation.
38
Now this is a pretty standard walkthrough here.
39
If you've installed software before, then a lot of this will look familiar.
40
So we're just going to agree to some terms.
41
You can change the install location if you want.
42
I'm just going to leave that as the default.
43
And you may need to put in your password to install this.
44
Now once that's finished installing, it will place a Python 3.6 directory in your applications folder.
45
And if we open up our applications folder and scroll down here a bit, then you can see I have an old version of Python 3.5 here,
46
but it installed this Python 3.6.
47
And if we open this up and look inside here, then we can see that we have this ID or idle application.
48
And we'll come back to that in just a second.
49
So now that we have Python 3.6 installed, let's go back to our terminal and check our Python version again.
50
So if I run that, actually, let me close down the terminal and open this back up just
51
so that we're sure that we're starting with a fresh slate.
52
So now if I run that Python version again, then most likely you're going to see that it still says Python 2.7.
53
Now the reason is because when we installed Python 3, it actually uses this Python 3 command instead.
54
So if I instead use this Python 3 command and check that version, then we can see that we get Python 3.6 that we just installed.
55
Now if we want the Python command to use Python 3, then one way we can do this is to create an alias.
56
Now to do this, we can add a line to this dot bash profile file.
57
And if you don't know what that is, then don't worry about it too much.
58
This is just going to allow us to associate the Python command with Python 3.
59
So you can use any editor to edit this file.
60
But since I'm already in a terminal, I'm just going to go ahead and use nano.
61
And nano is pretty easy for beginners.
62
So I will say nano.
63
Now this is in your home directory.
64
So a tilde means your home directory and then a slash.
65
Now this file is called bash underscore profile.
66
So now let's go ahead and open that up.
67
Now within this file you might realize
68
that I have some more content here than you do
69
and these are just some personal customizations that I have but don't worry about any of this.
70
If I go to the bottom here and let me like make this just a little bit larger here.
71
Now you should see that whenever you installed Python 3
72
that it actually added a few lines here at the bottom and you should have these lines also.
73
Now setting this path variable like it's doing here is what allows the Python 3 command to work.
74
So we'll move down here below to the bottom and add an alias.
75
Now to do this, all we have to do is say alias Python equals Python 3.
76
And you want to make sure it looks exactly like this.
77
No space between the equals or anything like that.
78
So now to save this, we can just hit control X to close.
79
hit Y to say that we want to save it, and then hit enter to keep that same file name.
80
So now if we quit out of our terminal and open this back up, and now let's check that Python version again.
81
So I'm going to do Python dash dash version, and now we can see that it's using Python 3.6.
82
Now I probably should have mentioned this earlier, but you do not have to create that Python alias.
83
If you wanted to, you could just use that Python 3 command to run all of your scripts,
84
but I like to use this Python command so that's why I personally like to create the alias.
85
Okay so now let's walk through how we install Python 3 for Windows.
86
Now if you're on a Mac and want to skip through this part
87
and you can click on the timestamp in the description below
88
that skips forward to when both of these installations are complete
89
but this install for Windows actually doesn't take very long at all.
90
Okay so to check
91
if Python is already installed we can open up our command prompt by going down here to start
92
and then search for CMD.
93
And let's open up that.
94
And I'm going to make this font a little bit bigger so that we can see here.
95
I think I can click on properties and font and we'll go with something a little bit larger there.
96
Okay.
97
Now to see if we have access to Python, we can just type in Python dash dash version.
98
And most likely you'll see that this is not yet installed and get this Python is not recognized error.
99
So to install this, we can just open up an internet browser and go to the Python website, which is python.org.
100
And from here, we can click on Downloads.
101
And from this page, you can see that it's already detected
102
that we are on Windows and has offered up either Python 3 or Python 2.
103
Now, if you're learning Python, then you're definitely going to want to go with Python 3 unless you have a really good reason to do otherwise.
104
So let's go ahead and go with this download of Python 3.6.
105
So let's go ahead and run this download.
106
And we should get this pop-up.
107
So I'm going to go ahead and run that.
108
Now, this is an important step here.
109
One thing that you're going to want to do is click this option to add Python 3.6 to your path.
110
This will allow us to get by without going into the advanced system settings and setting this path manually.
111
And adding that to your path will allow the Python command to work within the command prompt.
112
So with that selected, now let's go ahead and just click through this installation.
113
and it says that setup was successful.
114
So now that Python is installed, let's come down here to our command prompt and open it back up.
115
Actually, let's close this one down and start from scratch.
116
So we'll open this back up, type in CMD and open up that command prompt again.
117
And now we can make sure that that installed by typing in Python and then dash dash version.
118
You can see here that it says that we're working with Python 3.6.
119
So that's good.
120
Now, if we come down here and click on start and all programs, then we'll see that we have this Python 3.6 folder here that was installed with Python.
121
Within this folder, we can see that we have a program called Idle.
122
And I'm going to come back to this Idle program in just a second.
123
So when I mention this program, then just remember that you can find it here within this Python 3.6 folder.
124
So that is how we install Python for Windows.
125
Now I'm going to switch back to my native operating system on the Mac.
126
But from this point on, Python is going to work the same for both operating systems.
127
So everyone is going to be able to follow along.
128
Okay, so now I'm just going to go ahead and minimize that.
129
Okay, so now that we have Python installed, now we can begin and go ahead
130
and write our first bit of code by opening up either our terminal or our command prompt.
131
And I'll just close this installation window down in the back here and center this.
132
Okay, so now within the terminal or command prompt, if we just type in Python, then this will open what's called an interactive prompt.
133
And we can see that it shows that we're using Python 3.6.
134
Now, the interactive prompt allows us to write one line of Python at a time.
135
So, for example, for a Hello World application, then we could simply write print Hello World.
136
And we can see that it prints that out.
137
And we can also set variables.
138
So I could say x is equal to 10.
139
And if I print out x, then we can see that we get 10.
140
Now, this interactive prompt is okay for testing Python commands
141
but we really want to have a Python file where we can write multiple lines and run an entire script.
142
So let's exit this interactive prompt, and we can do that by typing exit and then opening close parentheses.
143
So to create a Python file, we're going to need some kind of plain text editor.
144
When we downloaded Python, it came with an editor called idle.
145
So let's open up that idle program.
146
So again, on Windows, that's in the Python 3.6 folder that we opened up earlier.
147
and on the Mac it's just down here in our applications and we can go ahead and open this up.
148
So I'm going to go ahead
149
and make the font a little bit bigger here by going to my preferences just
150
so that everyone can see and I'll bump this up to 18 or so.
151
Okay I think that's good.
152
Now by default
153
when we open up idle this is just another interactive prompt where we can write one line at a time
154
and you can usually tell when you're at an interactive prompt because of these three arrows here.
155
So to create an actual file, we can click on file and new file.
156
Now this will create a new file where we can write multiple lines of Python and actually make a script.
157
So for our first script, let's just print out hello world like we did before.
158
We can do that by calling the print function
159
and then these opening and closing parentheses and then either single or double quotes and then typing in hello world.
160
Now we're going to want to save this file.
161
So we can save this by clicking on file and then save.
162
And I'm going to call this intro.py and I'm just going to save this to my desktop.
163
So now I'll go ahead and save that.
164
So now to run the Python file that we just created, we can go back to our terminal or our command prompt
165
and from here we can type in Python
166
and then we want to type in the name of the file that we want to run.
167
Now this is relative to the directory that we're currently in.
168
So if we're in our home folder and you saved it to your desktop, then that should be in desktop.
169
And then the name of that file is intro.py.
170
So if we run that, then you can see that it printed out hello world.
171
So we just ran our first Python program.
172
Now I still have this Python file up over here.
173
And real quick, let me show you how to do a single inline comment in Python, because I'll be using these inline comments throughout these tutorials and don't want them to throw you off.
174
So in my script here, if I wanted to write a description of what's going on, then I could add a comment.
175
And to do this, we can just start up here at the top line.
176
and I'm going to go ahead and write a comment of what we're doing.
177
So it starts with the pound sign and then our comment.
178
So I'll just say print welcome message.
179
Now, if I go ahead and save that file and then run this again from my desktop, then you can see that it didn't do anything to our script.
180
It still just prints out hello world.
181
So when we actually run our Python programs, these comments are ignored.
182
It's only there for the developer and the programmer to actually see what's going on.
183
Now you don't need anything fancy to run these Python scripts.
184
So if you wanted to, then you could follow through all of my videos using this idle application like we have running here, and then running the script from the command line.
185
But if you plan on doing a lot of Python programming, then you'll likely want to upgrade to a better editor.
186
Now you can use any kind of plain text text editor that you want.
187
You can even use some command line editors like Vim or Emacs if you'd like.
188
some of the most popular editors, and I have some of these pulled up in the browser here.
189
So one very popular editor is Sublime Text, and that's at sublimetext.com.
190
Another popular text editor is Atom, and that's at atom.io.
191
And a very popular IDE is the JetBrains PyCharm IDE.
192
So Sublime Text and Atom are text editors, but with a lot of extra functionality built in
193
and PyCharm is a full-blown IDE and
194
that will give you a lot of extra features
195
that you might not find in other editors like the ability to debug a running application and things like that.
196
Now in this series of videos I'm going to be using Sublime Text.
197
Now I have a full video on how I set up
198
and customize my Sublime Text and I also have a full video on how to set up and customize Atom.
199
So if you want to use either of those editors then I highly recommend watching those videos
200
and I'll leave links to those in the description section below.
201
Now one nice thing about using one of these editors is that you can run Python from directly within the editor.
202
So I have the same intro.py file
203
that we just created pulled up here in Sublime Text
204
and I can run this by going to tools and build
205
or we could have just used that keyboard shortcut
206
but you can see that if we run that
207
and we get the same hello world output that we got when we ran this file from our command line.
208
So to follow along with these videos, you can use the idle application and use the command line to run those scripts, or you can set up one of these other text editors.
209
The choice is completely up to you.
210
Okay, so I think that is going to do it for this video.
211
In this video, we walked through how to install Python on both Mac and Windows.
212
We looked at how to run Python interactively within the terminal or command line.
213
And we also saw how to create a Python file and execute that script.
214
So in the next video, we'll start learning about variables and data types.
215
And specifically, we're going to look at the string data type and everything that we can do with those.
216
But if anyone has any questions about what we covered in this video, then feel free to ask in the comment section below and I'll do my best to answer those.
217
Now, if you enjoy these tutorials and would like to support them, then there are several ways you can do that.
218
The easiest way is to simply like the video and give it a thumbs up.
219
And also it's a huge help to share these videos with anyone who you think would find them useful.
220
And if you have the means, you can contribute through Patreon and and there's a link to that page in the description section below.
221
Be sure to subscribe for future videos, and thank you all for watching.

הורד אפליקציה

כל מה שאתה צריך כדי לדבר בשטף

הגיית AIציון לכל משפט
תרגול IPAשלוט בכל צליל
אוצר מיליםבנה את מאגר המילים שלך
משחק אוצר מיליםלמד תוך כדי משחק
FOR YOU

המלץ על סרטון

Vocabulary and speaking notes for this lesson

This video has 221 sentences and 3133 words to shadow. The speech runs for 15:16. The speaker talks fast, about 205 words per minute, so expect linked and reduced sounds. 85% of the words are among the 3,000 most common in English; the rest is worth studying before you start.

Key vocabulary in this video

15 words from the video worth learning, with pronunciation and meaning:

WordPronunciationMeaning
installed verb/ɪnˈstɔːld/readied for use
prompt verb/pɹɑmpt/To lead (someone) toward what they should say or do.
script noun/skɹɪpt/A writing; a written document.
terminal noun/ˈtɚmɪnəl/A building in an airport where passengers transfer from ground transportation to the facilities that allow them to board airplanes.
install verb/ɪnˈstɔl/To connect, set up or prepare something for use
idle adjective/ˈaɪd(ə)l/Not being used appropriately; not occupied; (of time) with no, no important, or not much activity.
folder noun/ˈfoʊldɚ/An organizer that papers are kept in, usually with an index tab, to be stored as a single unit in a filing cabinet.
installation noun/ˌɪn.stəˈleɪ.ʃən/An act of installing.
interactive adjective/ˌɪn.tɚˈæk.tɪv/Interacting with or communicating with and reacting to each other; influencing or having an effect on each other; acting or capable of acting on each other or…
dash noun/ˈdæʃ/Any of the following symbols: ‒ (figure dash), – (en dash), — (em dash), or ― (horizontal bar).
skip verb/skɪp/To move by hopping on alternate feet.
desktop noun/ˈdɛsktɒp/The top surface of a desk.
directory noun/dɪˈɹɛktəɹi/A list of names, addresses etc, of specific classes of people or organizations, often in alphabetical order or in some classification.
atom noun/ˈætəm/The smallest possible amount of matter which still retains its identity as a chemical element, now known to consist of a nucleus surrounded by electrons.
topic noun/ˈtɑpɪk/A subject; a theme; a category or general area of interest.

Phrasal verbs you will hear

WordPronunciationMeaning
go ahead verb/ˌɡoʊ əˈhɛd/To proceed with; to begin.
open up verbTo open.
back up verbTo move backwards, especially for a vehicle to do so.
set up verb/ˌsɛt ˈʌp/To make ready for use.
come down verbTo descend, fall down, collapse.
go back to verbTo stem from; to originate in.
print out verbTo print (a computer document).
pull up verb/ˌpʊl ˈʌp/To lift upwards or vertically.

דקדוק בסרטון הזה

המבנים שהדובר משתמש בהם הכי הרבה, עם המילים המדויקות מהסרטון:

מבנהבסרטון
משפטי תנאי (Conditional sentences) if + clause, will/would + verb — תנאי ותוצאה שלוif you enjoy these tutorials and would like
סביל (Passive voice) be + past participle — הדגש הוא על מה שקורה, לא על מי שעושה את הפעולהis called · is already installed · is not recognized
הווה מושלם (Present perfect) have/has + past participle — פעולה שקרתה בעבר ועדיין יש לה חשיבות או השפעה עכשיוI've already made · has offered · you've installed
משפטי זיקה (Relative clauses) who / which + clause — מידע נוסף על אדם או דברpeople who say · website, which is · anyone who you

Pronunciation to watch

The speaker uses 75 contractions and reduced forms, such as we're, I'm, I'll. Say them the short way, as you hear them.

  • The “th” sounds: thumb /ˈθʌm/, parenthesis /pəˈɹɛn.θə.sɪs/, walkthrough /ˈwɔːk.θɹuː/
  • The “sh” and “zh” sounds: installation /ˌɪn.stəˈleɪ.ʃən/, dash /ˈdæʃ/, bash /bæʃ/, associate /əˈsoʊʃi.ət/, controversial /ˌkɑn.tɹəˈvɝ.ʃəl/
  • Long words — get the stress right: installation /ˌɪn.stəˈleɪ.ʃən/, interactive /ˌɪn.tɚˈæk.tɪv/, directory /dɪˈɹɛktəɹi/, associate /əˈsoʊʃi.ət/, fundamental /ˌfʌn.dəˈmɛn.təl/

How to practise with this video

  1. Listen to the whole video once without speaking and note the words you do not know.
  2. Start at 0.75× speed, shadow it sentence by sentence, then go back to normal speed once it feels easy.
  3. Record yourself and compare with the original, paying attention to words like installed, prompt, script.

מהי טכניקת השאדואינג?

שאדואינג היא טכניקת למידת שפה מבוססת מדע שפותחה במקור להכשרת מתורגמנים מקצועיים ופופולרית על ידי הפוליגלוט ד"ר אלכסנדר ארגואלס. השיטה פשוטה אך עוצמתית: אתה מקשיב לאודיו באנגלית ילידית וחוזר עליו בקול רם מיד — כמו צל העוקב אחרי הדובר עם עיכוב של 1–2 שניות בלבד. בניגוד להאזנה פסיבית או תרגילי דקדוק, שאדואינג מכריח את המוח והשרירים בפה לעבד ולשחזר דפוסי דיבור אמיתיים בו זמנית. מחקרים מראים שזה משפר משמעותית את דיוק ההגייה, האינטונציה, הקצב, הדיבור המחובר, הבנת השמיעה ושטף הדיבור — מה שהופך אותו לאחת השיטות היעילות ביותר להכנה לIELTS Speaking ולתקשורת באנגלית בעולם האמיתי.

טכניקת Shadowing: קרא את המדריך המלא שלב אחר שלב →