All language subtitles for 006 Printing to the Console in Python_en

af Afrikaans
ak Akan
sq Albanian
am Amharic
hy Armenian
az Azerbaijani
eu Basque
be Belarusian
bem Bemba
bn Bengali
bh Bihari
bs Bosnian
br Breton
bg Bulgarian
km Cambodian
ca Catalan
ceb Cebuano
chr Cherokee
ny Chichewa
zh-CN Chinese (Simplified)
zh-TW Chinese (Traditional)
co Corsican
hr Croatian
cs Czech
da Danish
nl Dutch
en English
eo Esperanto
et Estonian
ee Ewe
fo Faroese
tl Filipino
fi Finnish
fr French
fy Frisian
gaa Ga
gl Galician
ka Georgian
de German
el Greek
gn Guarani
gu Gujarati
ht Haitian Creole
ha Hausa
haw Hawaiian
iw Hebrew
hi Hindi
hmn Hmong
hu Hungarian
is Icelandic
ig Igbo
id Indonesian
ia Interlingua
ga Irish
it Italian
ja Japanese
jw Javanese
kn Kannada
kk Kazakh
rw Kinyarwanda
rn Kirundi
kg Kongo
ko Korean
kri Krio (Sierra Leone)
ku Kurdish
ckb Kurdish (Soranรฎ)
ky Kyrgyz
lo Laothian
la Latin
lv Latvian
ln Lingala
lt Lithuanian
loz Lozi
lg Luganda
ach Luo
lb Luxembourgish
mk Macedonian
mg Malagasy
ms Malay
ml Malayalam
mt Maltese
mi Maori
mr Marathi
mfe Mauritian Creole
mo Moldavian
mn Mongolian
my Myanmar (Burmese)
sr-ME Montenegrin
ne Nepali
pcm Nigerian Pidgin
nso Northern Sotho
no Norwegian
nn Norwegian (Nynorsk)
oc Occitan
or Oriya
om Oromo
ps Pashto
fa Persian
pl Polish
pt-BR Portuguese (Brazil)
pt Portuguese (Portugal)
pa Punjabi
qu Quechua
ro Romanian
rm Romansh
nyn Runyakitara
ru Russian
sm Samoan
gd Scots Gaelic
sr Serbian
sh Serbo-Croatian
st Sesotho
tn Setswana
crs Seychellois Creole
sn Shona
sd Sindhi
si Sinhalese
sk Slovak
sl Slovenian
so Somali
es-419 Spanish (Latin American)
su Sundanese
sw Swahili
sv Swedish
tg Tajik
ta Tamil
tt Tatar
te Telugu
th Thai
ti Tigrinya
to Tonga
lua Tshiluba
tum Tumbuka
tr Turkish
tk Turkmen
tw Twi
ug Uighur
uk Ukrainian
ur Urdu
uz Uzbek
vi Vietnamese
cy Welsh
wo Wolof
xh Xhosa
yi Yiddish
yo Yoruba
zu Zulu

Original subtitles

To begin open up your browser and head over to this URL.

Now, if you didn't want to type all of that out and make some typos and errors and not get to the right

place, then simply just head over to the course resources and click on the link there.

It'll take you directly to this page.

Now, once you've clicked on the link that takes you to the starting replit, you should see something

that looks like this.

And the first thing I want you to do is to go ahead and click on the "Fork" button.

What this is going to do is it's going to create a version of that same replit that you'll see me

working through in the videos, but in this case you'll be able to edit it.

So if you want to save the work that you're doing, I recommend signing up to replit.

It's completely free.

You don't need any credit cards or anything.

Once you've created your account on replit, it will take you to the previous page where you can now

actually click the fork repl button.

And what that will do is it will create a copy of what I've created and put it into your account, and

then you'll be able to see a record of all of the code that you've written throughout the course.

In this course you'll be coding along with me on replit and completing a whole bunch of interactive

coding exercises in our replit classroom.

So go ahead, pause the video, sign up to replit and make sure you've forked the starting copy of

Day one printing start and you should be on a screen that looks like this.

And once you're signed in, then you can actually go ahead and edit the name of the replit or add a

brief description and you'll be able to access it later on through the My Repls folder.

Now, once you've done that, then let's go ahead and walk through some of the different parts of replit

that you'll be using.

First, on the left-hand side pane here, you've got some files and you can see the current file that's

open is this Python file here, and you can create new files or you can create new folders and later

on will be using these features to organize our code.

Now the other part of the left hand side pane that's really useful is the Settings tab here, and I

recommend everybody to switch their font size up to large.

This just makes it so much easier to identify mistakes and any typos you make.

Now we're going to leave everything else as it is, and you can click on the settings button to collapse

that pane so that you end up with more space for writing code.

And this area here is where you're going to be doing that.

All of your code is going to go inside here.

And once we're done with writing our code, we'll click run and it will execute.

And the results of our code will come up over on the console in the right here.

And I generally prefer to code using a darker background.

It's slightly easier on my eyes, especially when you're working at night.

So these are some of the most important parts of replit, but the important thing is it allows us to

just get started.

Now remember that the whole reason why we're learning to program is to be able to tell the computer

what it needs to do and for it to follow our commands.

So let's go ahead and tell the computer to do something, and we're going to do that by writing our

first line of code.

So in this case, I'm creating something called a print function, which is just the word "print", all

in lowercase, and then followed by a set of parentheses.

Now inside these parentheses, I'm going to tell it what I want it to print, and hopefully it's going

to output that inside our console.

So I'm going to start off by writing the classic "Hello World" inside here.

And then once you're ready, then go ahead and click Run.

After a few seconds, you should see the computer follow your command, namely printing the words that

you told it to print inside the console or the output area over here.

And once it's done, it indicates that with the little orange arrow and the way that this command works

is super simple.

You have the keyword "print" followed by a set of parentheses, and then inside the parentheses you tell

it what you want it to print.

And once you've inserted that, then when this line of code gets executed by the computer, it'll know

to simply print or output the thing that you've placed in between the parentheses.

But notice here that it's not just the word hello world exclamation mark that I've put inside my parentheses.

I've also added some quotation marks or double quotes around the word.

And the reason why I've done this is so that I can tell the computer that this bit here in between the

double quotes is not code.

It's not like print where it's supposed to do something.

This is just some text that I've made up that I want it to print out.

And these pieces of text in programming lingo is known as strings.

And you can imagine it as almost like a pearl necklace, right?

It's a string of characters.

And what the double quotes do is they basically show the beginning and the end of that string of characters.

So that means you have to be really careful when you're typing.

For example, if I go ahead and I miss out the closing double quote.

Well, now you can see that there's some changes that have happened to our code already, namely that

the last parentheses, instead of being coloured in white like the opening parentheses or how it used

to be, it's now coloured in orange.

And this is a subtle hint to us.

You're going to get really attuned to these subtle hints because they are the clues that will tell you

what might have gone wrong in your code.

If I run this code as it is right now, it's going to break.

It's going to give me a syntax error and it says something that seems like it's completely non English.

So how can we figure out what this means?

Now the thing I want you to know is that all programmers make mistakes.

We all make lots of errors, like forgetting to add the double quotes at the end of the string or forgetting

to add a closing parentheses.

These things are just common errors because we're human.

But the thing that differentiates great programmers is we're really good at figuring out what the problem

is and how to fix it.

So you can imagine that coding is just a whole bunch of problems that you have to solve.

And in this case, when we get some sort of red text on the right and our code is not doing what we

expect it to do, then all we have to do is take this entire error message where it says something,

something error, and this is some sort of message that we're supposed to understand and we're simply

going to drop it into Google.

And usually the first link you come across will be from a website called StackOverflow.com.

And this is basically the Q&A website that all developers will go to whenever something is wrong with

their code or when they can't figure out how to do something.

So if we click on this link, you can see that somebody else has also had this error.

And some kind souls have told us that the solution might be the fact that you're missing a double quote

before the end of the line.

So if we take a look back at our code, the code that generated this error looks like this.

And indeed, we are missing a double quote at the end of our string.

As you're learning to code, as you're going through your 100 days, I want you to become more and more

attuned to the color of your code.

Because one of the most helpful things that code editors such as this do for us is something called

syntax highlighting.

For example, when I was missing that double quote, it highlighted this entire thing in this orange

color.

And that is basically it telling us it seems like this whole thing is some text.

It thinks that all of this is a string and that we're missing a closing parenthesis.

So if you notice this and you're like, Wait, actually that's not right.

This part should be orange because this is what I want to be printed.

But this part should match the color of the open brace, which is white.

So there must be something wrong here.

And indeed, if you have a look at the error message, it actually has a little carat sign right here

showing you that there's something that's probably not right here and it might jog your memory that,

oh, yeah, I've forgotten a closing double quote.

And now when we run our code, you'll see that it's good as new.

So now it's your turn to try it out in a code challenge.

Head over to the next lesson.

Sign up to our classroom and then I'll guide you through getting started on your first coding challenge.

So all of that and more.

I'll see you on the next lesson.

Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.