Afrikaans
Akan
Albanian
Amharic
Arabic
Armenian
Azerbaijani
Basque
Belarusian
Bemba
Bengali
Bihari
Bosnian
Breton
Bulgarian
Cambodian
Catalan
Cebuano
Cherokee
Chichewa
Chinese (Simplified)
Chinese (Traditional)
Corsican
Croatian
Czech
Danish
Dutch
English
Esperanto
Estonian
Ewe
Faroese
Filipino
Finnish
French
Frisian
Ga
Galician
Georgian
German
Greek
Guarani
Gujarati
Haitian Creole
Hausa
Hawaiian
Hebrew
Hindi
Hmong
Hungarian
Icelandic
Igbo
Indonesian
Interlingua
Irish
Italian
Japanese
Javanese
Kannada
Kazakh
Kinyarwanda
Kirundi
Kongo
Korean
Krio (Sierra Leone)
Kurdish
Kurdish (Soranî)
Kyrgyz
Laothian
Latin
Latvian
Lingala
Lithuanian
Lozi
Luganda
Luo
Luxembourgish
Macedonian
Malagasy
Malay
Malayalam
Maltese
Maori
Marathi
Mauritian Creole
Moldavian
Mongolian
Myanmar (Burmese)
Montenegrin
Nepali
Nigerian Pidgin
Northern Sotho
Norwegian
Norwegian (Nynorsk)
Occitan
Oriya
Oromo
Pashto
Persian
Polish
Portuguese (Brazil)
Portuguese (Portugal)
Punjabi
Quechua
Romanian
Romansh
Runyakitara
Russian
Samoan
Scots Gaelic
Serbo-Croatian
Sesotho
Setswana
Seychellois Creole
Shona
Sindhi
Sinhalese
Slovak
Slovenian
Somali
Spanish
Spanish (Latin American)
Sundanese
Swahili
Swedish
Tajik
Tamil
Tatar
Telugu
Thai
Tigrinya
Tonga
Tshiluba
Tumbuka
Turkish
Turkmen
Twi
Uighur
Ukrainian
Urdu
Uzbek
Vietnamese
Welsh
Wolof
Xhosa
Yiddish
Yoruba
Zulu
Hey you're still sticking your round.
That's good.
I didn't bore you with all my talking but yes in this video finally we're going to write some python
code.
Holy moly.
Thank God.
I thought that was going to last forever.
All right.
So what is our first program going to do.
Well let's create a very very simple function.
And probably the first thing any programmer learns to do to print our own name.
So in here once you have your rebel thought I.T. setup or remember you can also use got that Io we're
simply going to write.
Print and then you see over here that it gives us some information but all we want to do is write brackets
a quote so we can do double quotes here or a single quote and just type your name.
And if we click run on the right side we've just run our very first python program.
Very exciting but what's happening here.
Well let's let's look at everything.
First of all if you're confused why.
My thing is dark and yours might be light.
It's because if I go to settings I've set my theme too light or too dark.
I prefer the dark version.
But you can change some of your settings you can change the font size if you want based on when you
watch the video.
This Web site the look might be different but most of the settings should be the same we see that we
have a main dot pie which is the python extension any file that has a dot Pi or P Y is a python file.
So while we've just written here on line one is a program that prints.
In this case Andre now goy or in your case your own name.
And we've written it to this file now wrap all that i t takes this file already has this interpreter
for us it runs this piece of code gives this source code of main dot pi to the interpreter and runs
it right here on our right side.
If you look over here we're using python version three point six point one.
And down below we see that we have Andre Bagley printed.
That's awesome.
So this is our code running.
Remember this diagram all we've done is we have our main dot pi where we wrote print Andre Agassi we
gave it to the interpreter that the ripple already provides for us that interpreter takes our code converts
it into byte code in here he'll say Andre Agassi and then it runs it in the C Python VM which was on
the right side that we saw and it finally prints our name because it tells the machine hey we want that
text printed.
So that's what we're seeing here.
This is the C Python virtual machine essentially running this code and telling this machine Hey I want
you to print this.
All right but this isn't very exciting.
I mean let's let's make this program a little bit more dynamic for our first program we want to do something
more impressive than just print name.
So I'm going to teach you a another thing we can do in Python.
And it's called input now in here I can say input and you see that ripple it actually gives me some
information saying that oh I have this you can just click here and this input over here.
Well what can we do.
This input is going to prompt a user.
And if I hover over it you can see how it's giving me some information but input simply gives us a way
to capture information.
So let's say what is your name and if I run this code we see that we have our Python code running and
it's asking me what is my name with this cursor here.
So I can actually type something here.
I can say Andre and if I hit enter.
Well there you go.
I've just typed in my own name.
Nothing that exciting.
Right.
But this is where code becomes interesting because we can store this information on our computer.
So again these are things that we're going to go over in detail in our basics Python section.
But just to write our first code well let's assign this too memory that is let's say that name equals
whatever is the input of what is your name.
And then finally we can just print the name so remember the interpreter is going to take this first
line it's going to ask what is your name.
I'm going to type something that typed information is going to get assigned to name and then finally
we print name.
Remember an interpreter takes.
Line by line converts code to bite code.
And then finally runs it so let's give this a try.
I'm going to click Run.
All right.
What's your name.
My name is Andre do you see the I typed in my name.
Hit enter and then it printed out.
ANDRE So for the final feat let's greet.
So we're going to say print Hello.
And then plus name.
Now don't worry about the syntax.
We're gonna go over it but all we're doing is saying hello and then adding our name to the end of this
so let's see what happens if I run this and say What is your name.
My name is Andre and I hit enter I get Hello Andre.
But no spaces so let's add a little space hit run again for the fourth time My name's Andre and says
Hello Andre there it is our first python program now it's not very exciting because it is our first
program we're just learning the steps here but I hope because we've covered some of these topics ahead
of time that this isn't just pure magic right.
You understand that this is source code this is main dot PI that we give to an interpreter that runs
our code line by line and then executes our program.
In this case are what is your name.
Program.
How cool is that.
This is just the beginning.
We're gonna get more and more advanced here.
See if he can play around with this.
We don't know that much about Python yet but I hope this gets you excited because while there's a lot
more coding coming along I'll see in the next one.
Bye bye.
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.