1
00:00:00,250 --> 00:00:04,059
To begin, open up your browser and head over to this URL.

2
00:00:04,350 --> 00:00:08,470
Now, if you didn't want to type all of that out and make some typos and errors

3
00:00:08,480 --> 00:00:11,450
and not get to the right place, then simply just head over to the course

4
00:00:11,450 --> 00:00:13,490
resources and click on the link there.

5
00:00:13,730 --> 00:00:15,660
It'll take you directly to this page.

6
00:00:16,730 --> 00:00:20,830
Now, once you've clicked on the link that takes you to the starting Replit

7
00:00:20,830 --> 00:00:23,520
you should see something that looks like this.

8
00:00:23,965 --> 00:00:28,974
And the first thing I want you to do is to go ahead and click on the Fork Button.

9
00:00:29,785 --> 00:00:34,775
What this is going to do is it's going to create a version of that

10
00:00:34,775 --> 00:00:38,424
same Replit that you'll see me working through in the videos,

11
00:00:38,754 --> 00:00:41,284
but in this case, you'll be able to edit it.

12
00:00:42,084 --> 00:00:44,570
So if you want to save the work that you're doing, I

13
00:00:44,570 --> 00:00:46,090
recommend signing up to Replit

14
00:00:46,090 --> 00:00:46,200
.

15
00:00:46,250 --> 00:00:47,320
It's completely free.

16
00:00:47,320 --> 00:00:49,230
You don't need any credit cards or anything.

17
00:00:49,540 --> 00:00:51,480
Once you've created your account on Replit,

18
00:00:51,480 --> 00:00:55,510
it will take you to the previous page where you can now

19
00:00:55,540 --> 00:00:58,390
actually click the Fork Repl  button.

20
00:00:58,630 --> 00:01:02,959
And what that will do is it'll create a copy of what I've created

21
00:01:03,170 --> 00:01:04,929
and put it into your account.

22
00:01:05,400 --> 00:01:09,810
And then you'll be able to see a record of all of the code that

23
00:01:09,820 --> 00:01:11,560
you've written throughout the course.

24
00:01:12,130 --> 00:01:14,579
In this course, you'll be coding along with me on Replit

25
00:01:14,580 --> 00:01:18,940
and completing a whole bunch of interactive coding exercises in our Replit

26
00:01:18,940 --> 00:01:19,589
classroom.

27
00:01:20,569 --> 00:01:24,189
So go ahead, pause the video, sign up to Replit

28
00:01:24,190 --> 00:01:28,470
and make sure you've forked the starting copy of 

29
00:01:28,470 --> 00:01:31,570
"day-1-printing-start" and you should be on a screen that looks like this.

30
00:01:33,640 --> 00:01:36,740
And once you're signed in, then you can actually go ahead

31
00:01:36,770 --> 00:01:39,100
and edit the name of the Replit

32
00:01:39,100 --> 00:01:42,890
or add a brief description and you'll be able to access it later

33
00:01:42,890 --> 00:01:45,090
on through the My Repls folder.

34
00:01:45,670 --> 00:01:49,270
Now once you've done that, then let's go ahead and walk through

35
00:01:49,510 --> 00:01:50,959
some of the different parts of Replit

36
00:01:50,959 --> 00:01:52,090
that you'll be using.

37
00:01:52,720 --> 00:01:56,690
First on the left-hand side pane here, you've got some files

38
00:01:56,860 --> 00:02:01,770
and you can see the current file that's open is this Python file here and you

39
00:02:01,770 --> 00:02:05,630
can create new files or you can create  new folders and later on we'll be using

40
00:02:05,630 --> 00:02:07,910
these features to organize our code.

41
00:02:08,579 --> 00:02:12,870
Now the other part of the left-hand side pane that's really useful is the settings

42
00:02:12,870 --> 00:02:17,769
tab here and I recommend everybody to switch their font-size up to large.

43
00:02:18,209 --> 00:02:22,510
This just makes it so much easier to
identify mistakes and any typos you make.

44
00:02:22,994 --> 00:02:26,204
Now, we're going to leave everything else as it is, and you can click

45
00:02:26,204 --> 00:02:29,644
on the settings button to collapse that pane, so that you end up

46
00:02:29,654 --> 00:02:31,764
with more space for writing code.

47
00:02:32,344 --> 00:02:35,915
And this area here is where you're going to be doing that.

48
00:02:36,094 --> 00:02:39,684
All of your code is going to go inside here, and once we're done

49
00:02:39,684 --> 00:02:44,154
with writing our code, we'll click Run, and it will execute, and the

50
00:02:44,154 --> 00:02:48,605
results of our code will come up over on the console in the right here.

51
00:02:49,665 --> 00:02:54,245
And I generally prefer to code using a darker background.

52
00:02:54,535 --> 00:02:58,305
It's slightly easier on my eyes, especially when you're working at night.

53
00:02:59,345 --> 00:03:02,084
So these are some of the most important parts of

54
00:03:02,084 --> 00:03:02,234
Replit,

55
00:03:02,615 --> 00:03:06,685
but the important thing is it allows us to just get started.

56
00:03:07,175 --> 00:03:11,325
Now remember that the whole reason why we're learning to program is to be able

57
00:03:11,325 --> 00:03:16,435
to tell the computer what it needs to do and for it to follow our commands.

58
00:03:16,920 --> 00:03:19,750
So let's go ahead and tell the computer to do something.

59
00:03:20,339 --> 00:03:23,350
And we're going to do that by writing our first line of code.

60
00:03:24,029 --> 00:03:28,339
So in this case, I'm creating something called a print function, which is just

61
00:03:28,339 --> 00:03:32,970
the word print all in lowercase, and then followed by a set of parentheses ().

62
00:03:33,405 --> 00:03:38,454
Now, inside these parentheses, I'm going to tell it what I want it to print,

63
00:03:38,995 --> 00:03:43,064
and hopefully it's going to output that inside our console.

64
00:03:44,165 --> 00:03:49,294
So I'm going to start off by writing the classic "Hello world!' inside here,

65
00:03:49,835 --> 00:03:53,265
and then once you're ready, then go ahead and click Run.

66
00:03:54,184 --> 00:03:57,835
After a few seconds, you should see the computer follow your command,

67
00:03:58,095 --> 00:04:02,935
namely printing the words that you told it to print inside the console

68
00:04:03,045 --> 00:04:04,695
or the output area over here.

69
00:04:05,795 --> 00:04:09,414
And once it's done, it indicates that with the little orange arrow.

70
00:04:10,295 --> 00:04:12,875
And the way that this command works is super simple.

71
00:04:13,125 --> 00:04:17,945
You have the keyword print, followed by a set of parentheses(), and then

72
00:04:18,024 --> 00:04:21,474
inside the parentheses, you tell it what you want it to print.

73
00:04:22,254 --> 00:04:26,624
And once you've inserted that, then when this line of code gets executed

74
00:04:26,625 --> 00:04:31,625
by the computer, it'll know to simply print o r output the thing that you've

75
00:04:31,625 --> 00:04:33,385
placed in between the parentheses.

76
00:04:35,905 --> 00:04:41,005
But notice here that it's not just the word, "Hello world!", 

77
00:04:41,035 --> 00:04:43,195
that I've put inside my parentheses,

78
00:04:43,895 --> 00:04:48,995
I've also added some quotation marks or double quotes around the word.

79
00:04:49,764 --> 00:04:54,049
And the reason why I've done this is so that I can tell the computer

80
00:04:54,349 --> 00:04:59,109
that this bit here in between the double quotes is not code.

81
00:04:59,250 --> 00:05:02,169
It's not like print where it's supposed to do something.

82
00:05:02,459 --> 00:05:06,289
This is just some text that I've made up that I want it to print out.

83
00:05:07,750 --> 00:05:12,369
And these pieces of text in programming lingo is known as strings.

84
00:05:12,949 --> 00:05:16,639
And you can imagine it as almost like a pearl necklace, right?

85
00:05:16,659 --> 00:05:19,329
It's a string of characters.

86
00:05:20,049 --> 00:05:26,085
And what the double quotes do is they basically show the beginning and the

87
00:05:26,085 --> 00:05:29,075
end of that string of characters.

88
00:05:30,405 --> 00:05:33,905
So that means you have to be really careful when you're typing.

89
00:05:34,224 --> 00:05:40,265
For example, if I go ahead and I miss out the closing double quote, well, now

90
00:05:40,295 --> 00:05:44,084
you can see that there's some changes that have happened to our code already,

91
00:05:44,654 --> 00:05:48,865
namely that the last parentheses, instead of being colored in white

92
00:05:48,955 --> 00:05:54,015
like the opening parentheses or how it used to be, it's now colored in

93
00:05:54,155 --> 00:05:56,835
orange and this is a subtle hint to us.

94
00:05:57,255 --> 00:06:01,394
You're going to get really attuned to these subtle hints because they

95
00:06:01,445 --> 00:06:05,525
are the clues that will tell you what might have gone wrong in your code.

96
00:06:06,084 --> 00:06:09,605
If I run this code as it is right now, it's going to break.

97
00:06:09,995 --> 00:06:15,035
It's going to give me a syntax error and it says something that seems

98
00:06:15,035 --> 00:06:17,055
like it's completely non-English.

99
00:06:17,435 --> 00:06:18,885
So how can we figure out

100
00:06:19,059 --> 00:06:20,159
what this means.

101
00:06:21,060 --> 00:06:25,659
Now, the thing I want you to know is that all programmers make mistakes.

102
00:06:25,710 --> 00:06:30,829
We all make lots of errors, like forgetting to add the double

103
00:06:30,829 --> 00:06:35,659
quotes at the end of the string or forgetting to add a closing

104
00:06:36,015 --> 00:06:36,915
parentheses,

105
00:06:37,375 --> 00:06:40,235
these things are just common errors because we're human.

106
00:06:40,965 --> 00:06:44,724
But the thing that differentiates great programmers is we're really

107
00:06:44,764 --> 00:06:48,525
good at figuring out what the problem is and how to fix it.

108
00:06:49,075 --> 00:06:51,794
So you can imagine that coding is just a whole bunch of

109
00:06:51,794 --> 00:06:53,194
problems that you have to solve.

110
00:06:53,810 --> 00:06:59,380
And in this case, when we get some sort of red text on the right, and our code is

111
00:06:59,380 --> 00:07:04,999
not doing what we expect it to do, then all we have to do is take this entire

112
00:07:05,050 --> 00:07:08,870
error message where it says something, something error, and this is some sort of

113
00:07:08,960 --> 00:07:10,840
message that we're supposed to understand.

114
00:07:11,519 --> 00:07:14,060
And we're simply going to drop it into Google.

115
00:07:14,520 --> 00:07:17,570
And usually the first link you come across will be from a

116
00:07:17,570 --> 00:07:19,130
website called

117
00:07:19,200 --> 00:07:19,510
stackoverflow.com.

118
00:07:20,040 --> 00:07:24,729
And this is basically the Q& A website that all developers will go to whenever

119
00:07:24,730 --> 00:07:28,380
something is wrong with their code or when they can't figure out how to do something.

120
00:07:29,900 --> 00:07:34,570
So if we click on this link, you can see that somebody else has also had

121
00:07:34,570 --> 00:07:39,760
this error and some kind souls have told us that the solution might be

122
00:07:40,010 --> 00:07:44,210
the fact that you're missing a double quote before the end of the line.

123
00:07:44,630 --> 00:07:48,439
So if we take a look back at our code, the code that generated

124
00:07:48,489 --> 00:07:50,414
this error looks like this.

125
00:07:50,865 --> 00:07:55,315
And indeed, we are missing a double quote at the end of our string.

126
00:07:57,165 --> 00:08:00,045
As you're learning to code, as you're going through your 100 days

127
00:08:00,125 --> 00:08:05,695
I want you to become more and more attuned to the color of your code,

128
00:08:06,154 --> 00:08:10,895
because one of the most helpful things that code editors such as this do for us

129
00:08:11,224 --> 00:08:13,714
is something called Syntax Highlighting.

130
00:08:14,385 --> 00:08:18,415
For example, when I was missing that double quote, it highlighted this

131
00:08:18,415 --> 00:08:21,315
entire thing in this orange color.

132
00:08:21,855 --> 00:08:27,235
And that is basically it telling us it seems like this whole thing is some text,

133
00:08:27,614 --> 00:08:33,683
it thinks that all of this is a string and that we're missing a closing parenthesis.

134
00:08:35,164 --> 00:08:39,575
So if you notice this and you're like, wait, actually, that's not right,

135
00:08:39,789 --> 00:08:43,409
this part should be orange because this is what I want to be printed,

136
00:08:43,830 --> 00:08:48,269
but this part should match the color of the open brace, which is white,

137
00:08:48,319 --> 00:08:50,200
so there must be something wrong here.

138
00:08:50,740 --> 00:08:55,410
And indeed, if you have a look at the error message, it actually has

139
00:08:55,459 --> 00:08:59,890
a little caret sign right here showing you that there's something

140
00:08:59,940 --> 00:09:01,680
that's probably not right here

141
00:09:02,210 --> 00:09:06,939
and it might jog your memory that, "Oh yeah, I've forgotten a closing

142
00:09:07,139 --> 00:09:07,759
double quote."

143
00:09:08,869 --> 00:09:12,160
And now when we run our code, you'll see that it's good as new.

144
00:09:12,740 --> 00:09:17,799
So now it's your turn to try it out in a code challenge.

145
00:09:18,209 --> 00:09:22,229
Head over to the next lesson, sign up to our classroom, and then I'll

146
00:09:22,229 --> 00:09:25,290
guide you through getting started on your first coding challenge.

147
00:09:25,510 --> 00:09:28,510
So all of that and more, I'll see you on the next lesson.

