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
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
Serbian
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
1
To begin, open up your browser and head over to this you URL: repl.it/@appbrewery/day-1-printing-start
2
repl.it/@appbrewery/day-1-printing-start
3
Now if you didn't want to type all of that out and make some typos and errors and not get to the right
4
place, then simply just head over to the course resources and click on the link there. It'll take you
5
directly to this page.
6
Now, once you've clicked on the link that takes you to the starting repl.it, you should see something
7
that looks like this.
8
And the first thing I want you to do is to go ahead and click on the fork button.
9
What this is going to do is it's going to create a version of that same repl.it that you'll see me
10
working through in the videos.
11
But in this case, you'll be able to edit it.
12
So if you want to save the work that you're doing, I recommend signing up to repl.it.
13
It's completely free.
14
You don't need any credit cards or anything.
15
And then you'll have to see a record of all of the code that you've written throughout the course.
16
In this course, you'll be coding along with me on repl.it and completing a whole bunch of interactive coding
17
exercises in our repl.it classroom.
18
Now, on day 15, when we level up to the intermediate stage, I'm going to be showing you how to install
19
a local Python code editor.
20
But until then, we want to get up and running and coding straight away.
21
So we're going to be using repl.it for the first 14 days.
22
So this video now and create your free repl.it account.
23
And once you're signed in, then you can actually go ahead and edit the name of the repl.it or add a
24
brief description and you'll be able to access it later on through the "My Repls" folder.
25
Now, once you've done that, then let's go ahead and walk through some of the different parts of repl.it
26
that you'll be using. First on the left hand side pane here
27
you've got some files. And you can see the current file that's open is this python file here.
28
And you can create new files or you can create new folders and later on will be using these features
29
to organize our code.
30
Now, the other part of the left hand side pane that's really useful is the settings tab here.
31
And I generally prefer to code using a darker background.
32
It's slightly easier on my eyes, especially when you're working at night and I recommend everybody
33
to switch their font size up to large.
34
This just makes it so much easier to identify mistakes and any typos you make.
35
Now we're going to leave everything else as it is and you can click on the settings button to collapse
36
that pane so that you end up with more space for writing code.
37
And this area here is where you're going to be doing that.
38
All of your code is going to go inside here.
39
And once we're done with writing our code we'll click run and it will execute and the results of our
40
code will come up over on the console in the right here.
41
So these are some of the most important parts of repl.it, but the important thing is it allows us to just
42
get started.
43
Now, remember that the whole reason why we're learning to program is to be able to tell the computer
44
what it needs to do and for it to follow our commands.
45
So let's go ahead and tell the computer to do something, and we can do that by writing our first line
46
of code.
47
So in this case, I'm creating something called a print function, which is just the word print - all
48
in lowercase - and then followed by a set of parentheses.
49
Now, inside these parentheses, I'm going to tell it what I want it to print and hopefully it's going
50
to output that inside our console.
51
So I'm going to start off by writing the classic "Hello World" inside here.
52
And then once you're ready, then go ahead and click "run".
53
After a few seconds, you should see the computer follow your command, namely printing the words that
54
you told it to print inside the console or the output area over here.
55
And once it's done, it indicates that with the little orange arrow and the way that this command works
56
is super simple, you have the keyword "print" followed by a set of parentheses, and then inside the
57
parentheses, you tell it what you want it to print.
58
And once you've inserted that, then when this line of code gets executed by the computer, you'll know
59
to simply print or output the thing that you've placed in between the parentheses.
60
But notice here that it's not just the word "Hello world!" exclamation mark that I've put inside my parentheses,
61
I've also added some quotation marks or double quotes around the word.
62
And the reason why I've done this is so that I can tell the computer that this bit here in between the
63
double quotes is not code.
64
It's not like print where it's supposed to do something.
65
This is just some text that I've made up that I want it to print out.
66
And these pieces of text in programming lingo is known as strings. And you can imagine it as almost
67
like a pearl necklace, right?
68
It's a string of characters.
69
And what the double quotes do is they basically show the beginning and the end of that string of characters.
70
So that means you have to be really careful when you're typing, for example, if I go ahead and I miss
71
out the closing quote.
72
Well, now you can see that there's some changes that have happened to our code already. Namely that
73
the last parentheses, instead of being colored and white, like the opening parentheses or how it used
74
to be, it's now colored in orange.
75
And this is a subtle hint to us.
76
You're going to get really attuned to these subtle hints because they are the clues that will tell you
77
what might have gone wrong in your code.
78
If I run this code as it is right now, it's going to break.
79
It's going to give me a syntax error.
80
And it says something that seems like it's completely non English.
81
So how can we figure out what this means?
82
Now, the thing I want you to know is that all programmers make mistakes.
83
We all make lots of errors, like forgetting to add the double quotes at the end of the string or forgetting
84
to add a closing parentheses.
85
These things are just common errors because we're human.
86
But the thing that differentiates great programmers is we're really good at figuring out what the problem
87
is and how to fix it.
88
So you can imagine that coding is just a whole bunch of problems that you have to solve.
89
And in this case, when we get some sort of red text on the right and our code is not doing what we
90
expected to do, then all we have to do is take this entire error message where it says something,
91
something error.
92
And this is some sort of message that we're supposed to understand and we're simply going to drop it
93
into Google.
94
And usually, the first thing you come across will be from a website called stackoverflow.com.
95
And this is basically the Q&A website that all developers will go to whenever something is wrong with
96
their code or when they can't figure out how to do something.
97
So if we click on this link, you can see that somebody else has also had this error and some kind souls
98
have told us that the solution might be the fact that you're missing a double quote before the end of
99
the line.
100
So if we take a look back at our code, the code that generated this error looks like this.
101
And indeed, we are missing a double quote at the end of our string.
102
As you're learning to code, as you're going through your 100 days, I want you to become more and more
103
attuned to the color ๐จ of your code, because one of the most helpful things that code editors such as
104
this do for us is something called syntax highlighting.
105
For example, when I was missing that double quote, it highlighted this entire thing in this orange
106
color.
107
And that is basically it telling us: "It seems like this whole thing is some text"
108
It thinks that all of this is a string and that we're missing a closing parenthesis.
109
So if you notice this and you're like "Wait, actually that's not right. This part should be orange"
110
because this is what I want to be printed.
111
But this part should match the color of the open brace, which is white.
112
So there must be something wrong here.
113
And indeed, if you have a look at the error message, it actually has a little caret sign right here
114
showing you that there's something that's probably not right here and it might jog your memory that
115
"Oh, yeah, I've forgotten a closing, double quote." ๐คฆโโ๏ธ
116
And now when we run our code, you'll see that it's good as new.
117
So now it's your turn to try it out in a code challenge.
118
Head over to the next lesson, sign up to our classroom and then I'll guide you through getting started
119
on your first coding challenge.
120
So all of that and more.
121
I'll see you in the next lesson.
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.