Would you like to inspect the original subtitles? These are the user uploaded subtitles that are being translated:
1
00:00:00,480 --> 00:00:04,800
All right, guys, welcome back to another challenge in our programming course.
2
00:00:04,950 --> 00:00:10,800
And in one of our previous challenges in this section, we've written a program using while loops that
3
00:00:10,800 --> 00:00:14,430
could calculate the result of the power for a given number.
4
00:00:14,550 --> 00:00:19,020
So we've added the power functionality to our calculator using the wired loops.
5
00:00:19,290 --> 00:00:23,250
And in the same way, I would like it to solve this task, the same task.
6
00:00:23,550 --> 00:00:28,200
But now, instead of using wired loops, we are going to use for loops.
7
00:00:28,320 --> 00:00:31,770
So just a quick reminder of what you have to do in this task.
8
00:00:32,070 --> 00:00:37,770
You simply have to write a program that will receive as input to numbers a number, a number itself
9
00:00:38,010 --> 00:00:39,220
and its power.
10
00:00:39,360 --> 00:00:46,010
And then the program should calculate the result of NUM in these particular in these given power and
11
00:00:46,050 --> 00:00:47,460
bring the result of a screen.
12
00:00:47,610 --> 00:00:54,570
So pretty much the same as the previous challenge where we solved this exercise by using a while loop.
13
00:00:55,570 --> 00:00:59,610
That just now we are going to use a for loop to solve this.
14
00:00:59,900 --> 00:01:03,990
This the same question just with another looping structure.
15
00:01:04,110 --> 00:01:09,120
So I hope it makes sense that you guys and what I want to show you hearing this challenge is that we
16
00:01:09,120 --> 00:01:16,260
can solve the same task by using different structures of loops, because both of them the for loop and
17
00:01:16,260 --> 00:01:19,140
the while loop, basically they can achieve.
18
00:01:19,260 --> 00:01:26,430
Maybe it will be written differently, but both of them can achieve the same thing on just syntax.
19
00:01:26,640 --> 00:01:32,580
The syntax will be changed a little bit and decipher the syntax that maybe changed.
20
00:01:33,240 --> 00:01:40,350
Some of them are better for one one, one type of problems, one type of challenges, while the other
21
00:01:40,350 --> 00:01:43,230
is better for another types of challenges.
22
00:01:43,560 --> 00:01:47,460
And but both of them can solve the same task.
23
00:01:48,610 --> 00:01:50,970
It just has to be modified a little bit.
24
00:01:51,180 --> 00:01:51,870
So that's it.
25
00:01:52,200 --> 00:01:54,780
So give it a try, guys, and I'll see you in the next video.
2663
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.