Would you like to inspect the original subtitles? These are the user uploaded subtitles that are being translated:
1
00:00:00,330 --> 00:00:03,440
All right, so here we are, another challenge.
2
00:00:03,480 --> 00:00:07,560
And in this challenge, we are going to do something really interesting.
3
00:00:07,740 --> 00:00:14,280
Suppose that you were using notepad word or any other app to write some text during your lectures or
4
00:00:14,280 --> 00:00:15,570
during your assignments.
5
00:00:15,780 --> 00:00:21,180
And since it's very important, you would like to know how many words to count, the number of words
6
00:00:21,210 --> 00:00:22,170
you've used there.
7
00:00:22,290 --> 00:00:27,540
And although some of these stills, for example, notepad, or were they provide you with this functionality
8
00:00:27,540 --> 00:00:29,850
to find the number of words in a given text?
9
00:00:30,390 --> 00:00:35,430
I want you to develop your own program that will basically do this task.
10
00:00:35,580 --> 00:00:41,010
And since you are a future great programmer, this task shouldn't be that complicated for you.
11
00:00:41,370 --> 00:00:43,350
So let's define the task once again.
12
00:00:43,560 --> 00:00:50,790
Write a program that reads a string from the user, finds out the number of words and prints the result
13
00:00:50,820 --> 00:00:51,570
to the screen.
14
00:00:51,810 --> 00:00:58,170
So, for example, if the given string is something like Hello, my name is Vlad, then the program
15
00:00:58,170 --> 00:01:01,650
should print number of words in the string is five.
16
00:01:01,920 --> 00:01:04,720
So that's basically what do you have to do to get a string?
17
00:01:04,740 --> 00:01:10,530
To find out how many words in this particular sentence or identify a couple of sentences.
18
00:01:10,530 --> 00:01:13,410
It doesn't matter how many words we have there.
19
00:01:13,560 --> 00:01:15,210
I hope the instructions are clear.
20
00:01:15,220 --> 00:01:20,790
And now we can give you some time to think of the solution and try figuring out how would you find the
21
00:01:20,790 --> 00:01:23,460
number of words in these given text?
22
00:01:23,580 --> 00:01:29,460
Basically, think about what separates every word and try to write a program that will be capable of
23
00:01:29,460 --> 00:01:30,890
solving this task.
24
00:01:31,020 --> 00:01:33,900
And good luck, guys, and I'll see you in the Solutions video.
2438
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.