All language subtitles for 3. n-th Term of Arithmetic Sequence - Solution

af Afrikaans
ak Akan
sq Albanian
am Amharic
ar Arabic
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
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 Spanish
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

So in this exercise, what we were requested to do is to find the anthe term, the ends term off an

arithmetic arithmetic sequence, and what we have to do is simply to use the following formula that

says and OK, the end term of this sequence will be equal to a one which is the initial term, plus

and minus one multiplied by the difference.

OK, so what we will simply have to do is to write a simple program that will read as the input all

of these three values, the initial term, the number of elements and the difference.

And based on these terms, we will calculate based on this formula, a mathematical formula.

We will calculate what will be the anthem of this given arithmetic sequence that starts at initial term

of a one with end values and the difference of D..

So let's go.

And the first thing that we have to do is simply create these variables.

So let's assume that we have with that we have both of them, a one in D, both of them are of a floating

coin type.

So float a one and we simply declare them and also we will declare the variable N and the main question

is, should we declare an is an integer or should we declare it is a floating point.

I just like a one in D in the answer is very simple.

We know that N represents the number of elements in a given arithmetic sequence.

So if it represents a given number.

Right.

It's probably going to be of an integer type because there may be two elements, three elements, five

elements, 10 elements.

But chances are not high that there will be two one, two and a half elements or a three in the third

elements.

Right.

That's not something that's going to happen.

So intense.

OK, and now what we are going to do is simply to run these print off-line.

So answer the initial term a one.

Right.

So we will read a one and then we will simply use kind of function to read this value and store it inside

a one.

Variables will present the Jeff because we are using a float type variable.

So it's kind of percentage are in here specifying the address of a one and that's it.

And now once we have a one, we also want to read the value of D, so please answer the difference,

the difference in the arithmetic arithmetic sequence.

OK, so for this given sequence that you want to calculate the end term, insert the difference between

any two consecutive elements, of course use the value from the council using this kind of function

and storage inside of the variable.

OK, is that clearer.

So far, good.

So finally, what we have to do for us to calculate and to use these formula, we know that A1, we

have it.

We also have the difference.

So another thing that we have to know is how many elements are there in this given sequence?

So for that, simply use additional last print F line for reading the information from the user.

Or so panter the number of elements of elements, elements in the RF medic sequence.

So now you have this kind of function and read it using the percentage placeholder and store side variable.

And so the first part of getting all the information necessary to calculate the anthe term of an arithmetic

sequence is now complete.

Now all that remains to do is just to print the result.

OK, so we can simply do it like this.

So print out and use it like at the end of term.

OK, off the arithmetic.

Our arithmetic sequence equals two percentage F backslash and instead of eight percent.

Jeff, what do you think we should use instead of this percentage if it should be a one?

Right.

The value of a one plus and minus one multiplied by the so simply taking these formula and we know that

these formula will give us the value of the ends term and we simply use it here.

And this value that will be calculated from this expression will be placed instead of this percentage

placeholder and the value and the result will be printed to the screen.

So let's just build and run it.

So there you go into the initial theorem, a one.

And previously it was one.

We had a difference between any two neighbors elements.

It was two.

And enter the number of elements in arithmetic sequence.

What was the number of elements?

I think it was nine.

And there you go.

The anthem of the arithmetic sequence equals to 17, just like we had in our example.

So pretty awesome guys.

We also covered some topic from math and we know how to use formulas for math in our programming language.

See, so also, maybe some of you would like to add additional variable and I don't know what to call

it again.

OK, that will represent the theorem.

And just before using these these print off-line are some of my students actually solved this exercise

just like this so and equals two and take all of these expression right from there.

Right.

Because we know that it's kind of exactly our formula.

So instead of this, we will simply use here again and the result is going to be the same.

So one, two and equals like nine.

So seventeen.

And if you would like to know what will be the value in having is a given arithmetic sequence, for

example, if you have one hundred number of elements, so the number is going to be one hundred and

ninety nine.

So awesome.

The formula seems to be working correctly.

And that's it I guess, right.

Yes.

So my name once again.

My name is Lord.

This is Alphatech and thank you so much for watching.

I will see you.

Thank you so much, so much for watching.

And I will see you in the next video.

Have a great day.

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