Would you like to inspect the original subtitles? These are the user uploaded subtitles that are being translated:
1
00:00:00,420 --> 00:00:09,180
Yellow, they're beautiful people, hello, they're my students, and in this exercise, we are going
2
00:00:09,450 --> 00:00:16,980
to continue practicing our skills, using loops in our programming language, in what we are going to
3
00:00:16,980 --> 00:00:19,980
do is simply to where is there to come here?
4
00:00:20,220 --> 00:00:26,550
We are going to write a program that receives a noun from the user and these programs should print this
5
00:00:26,550 --> 00:00:33,090
sum, should calculate and printed the sum of all integers from one up to numb.
6
00:00:33,120 --> 00:00:38,200
Basically all the natural numbers in these range from one to none.
7
00:00:38,310 --> 00:00:44,610
OK, so that's the whole point of our program that we are going to develop right now.
8
00:00:44,940 --> 00:00:50,820
And basically, if you want to see a couple of examples, let's say that you received a number five.
9
00:00:51,180 --> 00:00:57,930
So then your program should calculate all the values one plus two plus three plus four plus five and
10
00:00:57,930 --> 00:01:01,450
give you a total of 15 and print these value to the screen.
11
00:01:02,340 --> 00:01:04,770
Also, another example is seven.
12
00:01:04,780 --> 00:01:07,320
So one plus two up until seven.
13
00:01:07,830 --> 00:01:09,570
The final value is twenty eight.
14
00:01:09,630 --> 00:01:12,300
And you should printed also to the screen.
15
00:01:12,870 --> 00:01:16,140
And basically there are a couple of approaches to solve this exercise.
16
00:01:16,140 --> 00:01:23,190
Of course, if you're familiar with using the formulas of arithmetic sequence, that's OK, that's more
17
00:01:23,190 --> 00:01:23,760
efficient.
18
00:01:24,090 --> 00:01:31,020
But we are using loops and we would like to eat over all the elements from one to number into some them
19
00:01:31,020 --> 00:01:36,600
up in the way that you go, like one plus two plus three and so on and so forth.
20
00:01:36,630 --> 00:01:46,740
OK, so yeah, this is it for this video and give it a shot and I will see you with your solution in
21
00:01:46,740 --> 00:01:47,610
the next video.
22
00:01:48,400 --> 00:01:48,780
Goodbye.
2293
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.