Difference between revisions of "PERL/C2/while-do-while-loops/Gujarati"

From Script | Spoken-Tutorial
Jump to: navigation, search
(Created page with '{| border=1 |'''Time''' |'''Narration''' |- | 00:01 |Welcome to the spoken tutorial on '''while and do-while''' loops in '''Perl''' |- | 00:06 | In this tutorial, we will lea…')
 
 
(4 intermediate revisions by one other user not shown)
Line 5: Line 5:
 
|-
 
|-
 
| 00:01
 
| 00:01
|Welcome to the spoken tutorial on '''while and do-while''' loops in '''Perl'''
+
|પર્લમા  '''while and do-while''' પરનાં સ્પોકન ટ્યુટોરીયલમાં સ્વાગત છે.
 
   
 
   
 
|-
 
|-
 
| 00:06
 
| 00:06
| In this tutorial, we will learn about;  
+
| આ ટ્યુટોરીયલમાં, આપણે આપેલ વિશે શીખીશું;  
  
 
|-
 
|-
 
|00:09
 
|00:09
|'''while''' loop in '''Perl'''
+
| પર્લમા '''while''' લૂપ.
  
 
|-
 
|-
 
|00:11
 
|00:11
|'''do-while loop in Perl '''
+
|પર્લમા '''''do-while'''  લૂપ  હું વાપરી રહ્યી છું ઉબુન્ટુ લીનક્સ 12.04''' ઓપરેટીંગ સીસ્ટમ અને પર્લ 5.14.2'''
   
+
|-
+
|00:12
+
| I am using '''Ubuntu Linux12.04''' operating system and '''Perl 5.14.2'''
+
 
   
 
   
 
|-
 
|-
 
|00:20
 
|00:20
|I will also be using the '''gedit Text Editor'''.
+
|તેમજ હું gedit ટેક્સ્ટ એડીટર પણ વાપરીશ.
 
   
 
   
 
|-
 
|-
 
|00:24
 
|00:24
|You can use any text editor of your choice.
+
|તમે તમારા પસંદનું કોઈપણ ટેક્સ્ટ એડીટર વાપરી શકો છો.  
 
   
 
   
 
|-
 
|-
 
| 00:28
 
| 00:28
| You should have basic knowledge of '''Variables '''and''' Comments '''in''' Perl.'''
+
| તમને પર્લમાં વેરીએબલો અને કમેંટોની સામાન્ય જાણકારી હોવી અનિવાર્ય છે.  
 
   
 
   
 
|-
 
|-
 
|00:33
 
|00:33
|Knowledge of '''for''' and '''foreach''' loops in '''Perl''' will be an added advantage.
+
| પર્લમાં '''for''' અને  '''foreach''' લૂપ્સ નું જ્ઞાન હોવાથી વધારાના લાભ થશે.
  
 
|-
 
|-
 
|00:38
 
|00:38
|Please go through the relevant spoken tutorials on the spoken tutorial website.  
+
|સ્પોકન ટ્યુટોરીયલ વેબસાઈટ પર સંદર્ભિત સ્પોકન ટ્યુટોરીયલોનો સંદર્ભ લો.
 
   
 
   
 
|-
 
|-
 
| 00:43
 
| 00:43
| '''while''' loop in '''Perl'''
+
| '''Perl''' પર્લમાં ''while''' લૂપ
 
   
 
   
 
|-
 
|-
 
|00:45
 
|00:45
|The '''while''' loop executes a block of code while a condition is true.  
+
| કન્ડીશન ટ્રૂ હોય તો વ્હાઈલ લૂપ બ્લોક કોડને એક્ઝીક્યુટ કરશે.
 
   
 
   
 
|-
 
|-
 
|00:50
 
|00:50
|The syntax of '''while''' loop is as follows -  
+
| વ્હાઈલ લૂપનું સિન્ટેક્સ આપ્યા પ્રમાણે છે-  
 
   
 
   
 
|-
 
|-
 
|00:53
 
|00:53
|'''while space''' open bracket '''condition''' close bracket
+
|'''while space''' ખુલ્લું કૌંસ '''condition''' બંધ કૌંસ
 
   
 
   
 
|-
 
|-
 
|00:58
 
|00:58
|Open curly bracket
+
|ખુલ્લું છગડીયા કૌંસ
 
   
 
   
 
|-
 
|-
 
|01:00
 
|01:00
|Piece of code to be executed while the condition is true
+
| કન્ડીશન ટ્રૂ થવાથી કોડનો ભાગ એક્ઝીક્યુટ થાય છે.
 
   
 
   
 
|-
 
|-
 
|01:04
 
|01:04
|| Close curly bracket
+
| બંધ  છગડીયા કૌંસ
 
   
 
   
 
|-
 
|-
 
| 01:07
 
| 01:07
| So, what happens if the condition is not satisfied? Then, the '''while''' loop will exit, without executing the code within, even once.  
+
| કન્ડીશન સંતુષ્ટ ન હોય તો , શું થાય છે? તો વ્હાઈલ લૂપ એક વખત પણ એક્ઝીક્યુટ થયા  વગર  બાહર નીકળશે.
  
 
|-
 
|-
 
|01:16
 
|01:16
|Now let us look at an example of '''while''' loop.  
+
|ચાલો વ્હાઈલ લૂપનું ઉદાહરણ જોઈએ.
  
 
|-
 
|-
 
|01:19
 
|01:19
|Open the Terminal and type
+
|ટર્મિનલ ખોલો અને ટાઈપ કરો;
 
   
 
   
 
|-
 
|-
Line 89: Line 85:
 
|-
 
|-
 
|01:29
 
|01:29
|and press '''Enter'''
+
|Enter (એન્ટર) દબાવો.
 
   
 
   
 
|-
 
|-
 
|01:31
 
|01:31
|This will open the '''whileLoop.pl''' file in '''gedit. '''
+
|'''gedit. ''' મા  '''whileLoop.pl''' ફાઈલ ખોલશે.
 
   
 
   
 
|-
 
|-
 
|01:34
 
|01:34
| Now Type the following code
+
| હવે આપેલ કોડ ટાઈપ કરો.   
 
   
 
   
 
|-
 
|-
Line 105: Line 101:
 
|-
 
|-
 
|01:45
 
|01:45
|Press '''Enter'''
+
|Enter (એન્ટર) દબાવો.
 
   
 
   
 
|-
 
|-
Line 113: Line 109:
 
|-
 
|-
 
| 01:52
 
| 01:52
| Press '''Enter '''
+
| Enter (એન્ટર) દબાવો.
 
   
 
   
 
|-
 
|-
 
|01:54
 
|01:54
|'''while''' open bracket '''dollar i less than or equal to four''' close bracket space  
+
|'''while''' ખુલ્લું કૌંસ '''dollar i less than or equal to four''' બંધ કૌંસ space  
 
   
 
   
 
|-
 
|-
 
|02:04
 
|02:04
|Open curly bracket press '''Enter''' and type
+
|ખુલ્લો છગડીયો કૌંસ '''enter''' દબાવો. 
 
   
 
   
 
|-
 
|-
Line 129: Line 125:
 
|-
 
|-
 
|02:20
 
|02:20
|Press '''Enter '''
+
|Enter (એન્ટર) દબાવો.
 
   
 
   
 
|-
 
|-
Line 137: Line 133:
 
|-
 
|-
 
|02:27
 
|02:27
| press '''Enter'''  and
+
| Enter (એન્ટર) દબાવો. છગડીયા કૌંસને બંધ કરો.
 
+
|-
+
|02:28
+
|Close the curly bracket
+
 
   
 
   
 
|-
 
|-
 
|02:31
 
|02:31
|Let me explain the '''while''' loop in detail.  
+
| ચાલો હું વ્હાઈલ લૂપને સારાંશમા સમજાવું.
 
   
 
   
 
|-
 
|-
 
| 02:33
 
| 02:33
| We have initialized the variable '''i''' to 0.  
+
| આપણે બેરીએબલ  '''i''' ને 0 થી  ઈનીશલાઈઝ કર્યું છે.
  
 
|-
 
|-
 
|02:38
 
|02:38
|Now we have specified the condition for '''while''' loop as '''$i'''  less than or equal to 4.  
+
| હવે આપણે  વ્હાઈલ લૂપને '''$i'''  less than or equal to 4.  આ કન્ડીશન નિર્દિષ્ટ કરીછે.
 
   
 
   
 
|-
 
|-
 
|02:46
 
|02:46
| If the '''condition''' is true, the code within the '''while''' loop will get executed.  
+
| જો કન્ડીશન ટ્રૂ હોય તો વ્હાઈલ લૂપ અંતર્ગત આવેલ કોડ એક્ઝીક્યુટ થશે.
  
 
|-
 
|-
 
|02:52
 
|02:52
|This means, first time our '''while''' loop will ''' print 'Value of i: 0' ''' on the terminal.  
+
|એટેલેકે તે ટર્મિનલ પર પ્રથવાર  'Value of i: 0' ''' પ્રિન્ટ કરે છે.
 
   
 
   
 
|-
 
|-
 
|03:01
 
|03:01
|Then the ''' $i++ ''' will increments the value of variable i by one.  
+
| પછી ''' $i++ ''' વેરીએબલની વેલ્યુ  એકથી વધાવશે.
  
 
|-
 
|-
 
| 03:08
 
| 03:08
Now again, the loop condition ''' $i<=4''' will be evaluated.  
+
| હવે ફરીથી લૂપ કન્ડીશન ''' $i<=4''' નું મૂલ્યાંકન કરવામાં આવશે.
 
   
 
   
 
|-
 
|-
 
|03:16
 
|03:16
|And the loop will exit once the value of i becomes 5.  
+
|અને એકવાર  જો  I ની કિંમત 5 બની જાય છે લૂપ બહાર નીકળવા કરશે.
 
   
 
   
 
|-
 
|-
 
|  03:22
 
|  03:22
| In this case, '''while''' loop will get executed for '''i''' equal to 0, 1, 2, 3, 4.   
+
| આ કિસ્સામાં ,વ્હાઈલ લૂપ  '''i''' equal to 0, 1, 2, 3, 4. માટે એક્ઝીક્યુટ થશે.   
 
   
 
   
 
|-
 
|-
 
|  03:32
 
|  03:32
| Press ctrl+s to save the file.  
+
| ફાઈલને સંગ્રહવા માટે Ctrl+S દબાવો.
 
   
 
   
 
|-
 
|-
 
|03:35
 
|03:35
|Now, switch to the terminal.  
+
|હવે, ટર્મિનલ પર સ્વીચ કરો.
 
   
 
   
 
|-
 
|-
 
| 03:37
 
| 03:37
| Type the following to check for any compilation or syntax error -
+
| કોઈપણ કમ્પાઈલેશન અથવા સિન્ટેક્સ એરર છે કે તે તપાસવા માટે ટાઈપ કરો:
 
   
 
   
 
|-
 
|-
Line 197: Line 189:
 
|-
 
|-
 
| 03:47
 
| 03:47
and press '''Enter.'''
+
અને Enter (એન્ટર) દબાવો.  
 
   
 
   
 
|-
 
|-
 
| 03:49
 
| 03:49
|The following line will be displayed on the terminal
+
|આપેલ લાઈન ટર્મિનલ પર દ્રશ્યમાન થાય છે.
 
   
 
   
 
|-
 
|-
Line 209: Line 201:
 
|-
 
|-
 
|03:56
 
|03:56
|As there is no compilation or syntax error, we will execute the '''Perl''' script by typing -  
+
| કોઈપણ કમ્પાઈલેશન અથવા સિન્ટેક્સ એરર ન હોવાથી આપણે આ ટાઈપ કરીને પર્લ સ્ક્રીપ્ટ એક્ઝીક્યુટ કરીશું -
 
   
 
   
 
|-
 
|-
Line 217: Line 209:
 
|-
 
|-
 
|04:06
 
|04:06
|and press '''Enter'''
+
|અને Enter (એન્ટર) દબાવો.
 
   
 
   
 
|-
 
|-
 
|04:09
 
|04:09
|The following output will be displayed on the terminal.  
+
|ટર્મિનલ પર આપેલ આઉટપુટ દેખાશે.  
 
   
 
   
 
|-
 
|-
 
|  04:14
 
|  04:14
| Now, let us look at '''do-while loop'''
+
| હવે ચાલો  '''do-while loop''' જોઈએ.
  
 
|-
 
|-
 
|  04:20
 
|  04:20
| The '''do...while''' statement will always execute the piece of code at-least once.  
+
|સ્ટેટમેંટ હમેશા '''do...while''   ઓછામાં ઓછી એક વાર કોડના ભાગ ને એક્ઝીક્યુટ કરશે.
 
   
 
   
 
|-
 
|-
 
|  04:25
 
|  04:25
| It will then check the condition and repeat the loop while the condition is true.  
+
| જયારે  કન્ડીશન ટ્રૂ હોય તો તે પછી  કન્ડીશન તપાસી અને લૂપને રીપીટ કરશે.  
 
   
 
   
 
|-
 
|-
 
| 04:30
 
| 04:30
|The syntax for '''do-while ''' loop is as follows -  
+
| '''do-while ''' લૂપનું સિન્ટેક્સ આપ્યા પ્રમાણે છે -  
  
 
|-
 
|-
Line 245: Line 237:
 
|-
 
|-
 
|04:36
 
|04:36
|open curly bracket
+
|ખુલ્લો છગડીયો કૌંસ
  
 
|-
 
|-
 
|04:38
 
|04:38
|Piece of code to be executed while the condition is true
+
|કન્ડીશન ટ્રૂ થવા પર  એક્ઝીક્યુટ કોડનાં  ભાગ.
 
   
 
   
 
|-
 
|-
 
|04:42
 
|04:42
|close curly bracket then space
+
|બંધ છગડીયો કૌંસ પછી સ્પેસ 
 
   
 
   
 
|-
 
|-
 
|04:45
 
|04:45
|'''while''' space within brackets '''condition''' and then semicolon  
+
|'''while''' space within brackets '''condition''' અને  પછી  semicolon  
 
   
 
   
 
|-
 
|-
 
|04:50
 
|04:50
|Open the Terminal and type;  
+
|ટર્મિનલ ખોલો અને ટાઈપ કરો;  
  
 
|-
 
|-
Line 269: Line 261:
 
|-
 
|-
 
| 05:03
 
| 05:03
and then press '''Enter'''
+
અને Enter (એન્ટર) દબાવો.
  
 
|-
 
|-
 
| 05:05
 
| 05:05
This will open '''doWhileLoop.pl''' file in '''gedit.'''  
+
તે '''gedit.''' મા '''doWhileLoop.pl''' ફાઈલ ખોલશે.
 
   
 
   
 
|-
 
|-
 
|05:09
 
|05:09
| Type the following piece of code -  
+
| કોડનાં આ ભાગને ટાઈપ કરો  -
 +
 
|-
 
|-
 
|05:11
 
|05:11
|'''hash exclamation mark slash u s r slash bin slash perl''' Press '''Enter'''
+
|'''hash exclamation mark slash u s r slash bin slash perl'''   '''Enter''' દબાવો.
 
   
 
   
 
|-
 
|-
 
|05:21
 
|05:21
|'''dollar i equals to zero semicolon press enter'''
+
|'''dollar i equals to zero semicolon એન્ટર દબાવો.
  
 
|-
 
|-
Line 292: Line 285:
 
|-
 
|-
 
|05:29
 
|05:29
|open curly bracket enter type
+
|ખુલ્લો છગડીયો કૌંસ એન્ટર ટાઈપ કરો.
  
 
|-
 
|-
Line 300: Line 293:
 
|-
 
|-
 
|05:46
 
|05:46
|Press '''Enter '''
+
|એન્ટર દબાવો.
 
   
 
   
 
|-
 
|-
Line 308: Line 301:
 
|-
 
|-
 
|  05:52
 
|  05:52
| press '''enter '''
+
| એન્ટર દબાવો.
 
   
 
   
 
|-
 
|-
 
|  05:54
 
|  05:54
| close curly bracket
+
| બંધ છગડીયો કૌંસ.
 
   
 
   
 
|-
 
|-
Line 320: Line 313:
 
|-
 
|-
 
|  06:06
 
|  06:06
close bracket semicolon  
+
બંદ કૌંસ  '''semicolon'''
  
 
|-
 
|-
 
|  06:10
 
|  06:10
| Here is the detail explanation of a '''do-while''' loop.  
+
| અહી  '''do-while''' લૂપ વિષે વિગતમા સમજૂતી છે. .  
 
   
 
   
 
|-
 
|-
 
| 06:13
 
| 06:13
| We have initialized the variable i to 0.  
+
| આપણે '''i'''  ને '''0.''' થી ઈનીશીલાઈઝડ કરીશું.
  
 
|-
 
|-
 
|  06:18
 
|  06:18
|First time, the '''do-while''' loop will print the output as ''' 'Value of i colon 0' ''' on the terminal without checking for condition
+
| પ્રથમ વખત કન્ડીશન તપાસ્યા વિના ડુ  વ્હાઈલ લૂપ ''' 'Value of i colon 0' ''' તરીકે આઉટપુટ પ્રિન્ટ કરશે.
 
   
 
   
 
|-
 
|-
 
|06:28
 
|06:28
|''' $i++ ''' will increment the value of variable i by one each time loop gets executed.  
+
|દરેક વખતે લૂપ એક્ઝીક્યુટ થવા પર  ''' $i++ ''' વેરીએબલ''' i''' ની વેલ્યુ  એકથી વધાવશે.
 
   
 
   
 
|-
 
|-
 
|  06:36
 
|  06:36
| Second time, the condition '''$i''' less than or equal to 4 will be checked.  
+
|બીજી વાર ''''''$i''' less than or equal to 4''' આ કન્ડીશન તપાસશે.  
 
   
 
   
 
|-
 
|-
 
|  06:43
 
|  06:43
| If the condition is true, the loop will get executed again.  
+
| જો કન્ડીશન ટ્રૂ હોય તો લૂપ ફરીથી એક્ઝીક્યુટ થશે.
  
 
|-
 
|-
 
|06:48
 
|06:48
|In our case, second time the output displayed on terminal will be ''' 'Value of i colon 1' '''.
+
| આપણા કિસ્સામાં બીજી વખત ટર્મિનલ પર  ''' 'Value of i colon 1' '''.આ આઉટપુટ દ્રશ્યમાન થશે.
 
   
 
   
 
|-
 
|-
 
| 06:57
 
| 06:57
| The loop will get executed till the condition becomes false that is when variable i becomes 5.  
+
| કન્ડીશન '''false'''થતા સુધી  એટલેકે વેરીએબલ 5 થતા સુધી લૂપ એક્ઝીક્યુટ થશે.
 
   
 
   
 
|-
 
|-
 
| 07:05
 
| 07:05
| Press '''ctrl+s''' to '''save''' the file.  
+
| ફાઈલને સંગ્રહવા માટે Ctrl+S દબાવો.  
 
   
 
   
 
|-
 
|-
 
|07:09
 
|07:09
|Now, switch to terminal and type the following to check for any compilation or syntax error.  
+
|હવે, ટર્મિનલ પર સ્વીચ કરો. કોઈપણ કમ્પાઈલેશન અથવા સિન્ટેક્સ એરર છે કે તે તપાસવા માટે ટાઈપ કરો:
 
   
 
   
 
|-
 
|-
Line 368: Line 361:
 
|-
 
|-
 
| 07:21
 
| 07:21
and press '''Enter.'''
+
અને Enter (એન્ટર) દબાવો.  
  
 
|-
 
|-
 
|  07:23
 
|  07:23
| The following line will be displayed on the terminal
+
| આપેલ  લાઈન ટર્મિનલ પર દ્રશ્યમાન થશે.
 
   
 
   
 
|-
 
|-
Line 380: Line 373:
 
|-
 
|-
 
|07:30
 
|07:30
|As there are no compilation or syntax errors, we will now execute the '''Perl''' script.
+
|કોઈપણ કમ્પાઈલેશન અથવા સિન્ટેક્સ એરર ન હોવાથી આપણે આ ટાઈપ કરીને પર્લ સ્ક્રીપ્ટ એક્ઝીક્યુટ કરીશું -
 
   
 
   
 
|-
 
|-
 
|07:36
 
|07:36
|Type '''perl doWhileLoop dot pl'''
+
|ટાઈપ કરો  '''perl doWhileLoop dot pl'''
 
   
 
   
 
|-
 
|-
 
|07:41
 
|07:41
|and press '''Enter'''
+
|અને Enter (એન્ટર) દબાવો.
 +
 
 
 
 
 
 
|-
 
|-
 
| 07:43
 
| 07:43
| The following output will be displayed on the terminal.  
+
| ટર્મિનલ પર આપેલ આઉટપુટ દ્રશયમાન થશે.  
 
   
 
   
 
|-
 
|-
 
|07:48
 
|07:48
| Now, let us see the actual difference between '''while''' and '''do-while''' loops.  
+
|ચાલો હવે  '''while''' અને  '''do-while''' લૂપ્સ વચ્ચે  વાસ્તવિક તફાવત જોઈએ.
  
 
|-
 
|-
 
|07:53
 
|07:53
| Open the Terminal, type -  
+
| ટર્મિનલ ખોલો અને ટાઈપ કરો -  
  
 
|-
 
|-
Line 408: Line 402:
 
|-
 
|-
 
|08:01
 
|08:01
| and press '''Enter'''
+
| અને Enter (એન્ટર) દબાવો.
  
 
|-
 
|-
 
|08:03
 
|08:03
| This will open '''loop dot pl''' file in '''gedit. '''
+
| આ  '''gedit. ''' મા '''loop dot pl''' ફાઈલ ખોલશે.
  
 
|-
 
|-
 
|08:07
 
|08:07
| Now type the piece of code shown.  
+
| હવે બતાવેલ કોડનો ભાગ ટાઈપ કરો.
  
 
|-
 
|-
 
|08:12
 
|08:12
| We have declared a variable '''count''' and initialized it to zero
+
| આપણે '''count''' વેરીએબલ ડીકલેર કર્યું અને તેને ઝીરોથી ઈનીશીલાઈઝ કર્યું.
  
 
|-
 
|-
 
|08:19
 
|08:19
|In the '''while''' loop condition, we are checking if the variable '''count''' is greater than zero.  
+
| વ્હાઈલ લૂપ કન્ડીશન મા આપણે તપાસીએ છીએ કે વેરીએબલ '''count''' એ ઝીરો કરતા મોટું છે કે.
  
 
|-
 
|-
 
|08:29
 
|08:29
|The condition is not true. So, the '''while''' loop code will not be executed even once.  
+
|કન્ડીશન ટ્રૂ નથી.તો વ્હાઈલ લૂપ કન્ડીશન એક વાર પણ એક્ઝીક્યુટ નહી થાય.
  
 
|-
 
|-
 
|08:36
 
|08:36
|In the '''do...while''' loop, we are first executing the code and then checking the condition.  
+
| '''do...while''' લૂપ મા આપણે કોડ પહેલા એક્ઝીક્યુટ કરીએ છીએ અને પછી કન્ડીશન તપાસીએ છીએ.
  
 
|-
 
|-
 
|08:44
 
|08:44
|So, the code will be executed at least once.  
+
|તો કોડ એક વખત તો એક્ઝીક્યુટ થશે.
  
 
|-
 
|-
 
|08:49
 
|08:49
|Then the condition whether the variable '''count''' is greater than zero, is checked.  
+
| પછી કન્ડીશન ''count''' વેરીએબલ ઝીરો કરતા મોટું છે કે તે તપાસ્યું છે.
  
 
|-
 
|-
 
|08:57
 
|08:57
|The condition is not true. So the loop will exit.  
+
| કન્ડીશન ટ્રૂ નથી.તો લૂપ બહાર નીકળશે.  
  
 
|-
 
|-
 
|09:02
 
|09:02
|Now, press '''ctrl+s''' to save the file.  
+
|ફાઈલને સંગ્રહવા માટે Ctrl+S દબાવો.  
  
 
|-
 
|-
 
|09:05
 
|09:05
|Now, switch to terminal and type the following to check for any compilation or syntax errors
+
| હવે, ટર્મિનલ પર સ્વીચ કરો અને કોઈપણ કમ્પાઈલેશન અથવા સિન્ટેક્સ એરર છે કે તે તપાસવા માટે ટાઈપ કરો:
  
 
|-
 
|-
Line 460: Line 454:
 
|-
 
|-
 
|09:16
 
|09:16
|and press '''Enter.'''
+
|અને Enter (એન્ટર) દબાવો.  
  
 
|-
 
|-
 
|09:19
 
|09:19
|The following line will be displayed on the terminal.  
+
|આપેલ  લાઈન ટર્મિનલ પર દ્રશ્યમાન થશે.
  
 
|-
 
|-
Line 472: Line 466:
 
|-
 
|-
 
|09:26
 
|09:26
|As there are no compilation or syntax errors, let us execute the '''Perl''' script.
+
|કોઈપણ કમ્પાઈલેશન અથવા સિન્ટેક્સ એરર ન હોવાથી આપણે આ ટાઈપ કરીને પર્લ સ્ક્રીપ્ટ એક્ઝીક્યુટ કરીશું -
 +
  
 
|-
 
|-
 
|09:31
 
|09:31
|By Typing '''perl loop dot pl'''
+
|ટાઈપ કરો  '''perl loop dot pl'''
  
 
|-
 
|-
 
|09:36
 
|09:36
|and press '''Enter.'''
+
|અને Enter (એન્ટર) દબાવો.  
  
 
|-
 
|-
 
|09:38
 
|09:38
|The following output will be displayed on the terminal.  
+
|ટર્મિનલ પર આપેલ આઉટપુટ દ્રશયમાન થશે.  
  
 
|-
 
|-
Line 492: Line 487:
 
|-
 
|-
 
|09:46
 
|09:46
|Here we can see, there is no output message displaying ''' 'I am in while loop' '''
+
|અહી આપણે જોઈએ શકીએ છીએ અહી ''' 'I am in while loop' ''' જવું  કોઈ પણ આઉટપુટ મેસેજ દ્રશ્યમાન નથી 
  
 
|-
 
|-
 
|09:52
 
|09:52
|This message was what we printed inside the while loop.  
+
| આ મેસેજ જે આપણે વ્હાઈલ લૂપમા પ્રિન્ટ કરવા આપ્યો હતો તે છે.
  
 
|-
 
|-
 
|09:59
 
|09:59
|This implies that,
+
|આ સૂચિત કરે છે.
 
   
 
   
 
|-
 
|-
 
|10:01
 
|10:01
|'''do-while''' loop executes at-least once before evaluating the condition
+
|'''do-while''' લૂપ  કન્ડીશન મૂલ્યાંકન કરવા પહેલા ઓછા મા ઓછી એક વખત એક્ઝીક્યુટ કરે છે.
  
 
|-
 
|-
 
|10:07
 
|10:07
|whereas '''while''' loop does not get executed even once when the condition specified is false.  
+
| જો આપેલ કન્ડીશન '''false''' હોય તો વ્હાઈલ લૂપ એક વખત પણ એક્ઝીક્યુટ થશે નહી.
  
 
|-
 
|-
 
|10:15
 
|10:15
|I hope the difference is clear to you now.  
+
| મને આશા છે કે હવે તમને તફાવત ખબર પડી ગયી છે.
  
 
|-
 
|-
 
|10:18
 
|10:18
|That's all there is to '''while''' and '''do-while''' loops.  
+
| '''while''' અને  '''do-while''' લૂપ્સ પર  બસ આટલું જ.  
  
 
|-
 
|-
 
|10:22
 
|10:22
|Let us summarize.  
+
|સારાંશ માં.
  
 
|-
 
|-
 
|10:24
 
|10:24
|In this tutorial, we have learnt -  
+
|આ ટ્યુટોરીયલમાં, આપણે શીખ્યા છે -
  
 
|-
 
|-
 
|10:26
 
|10:26
|'''while''' loop and '''do-while''' loop in '''Perl'''  
+
| લૂપ પર્લમાં ''while''' લૂપ  અને  '''do-while'''  
  
 
|-
 
|-
 
|10:29
 
|10:29
|using sample programs.  
+
|સેમ્પલ પ્રોગ્રામ વાપરતા .
  
 
|-
 
|-
 
|10:31
 
|10:31
|Here is assignment for you -  
+
|અહીં તમારા માટે અસાઇનમેન્ટ છે -
  
 
|-
 
|-
 
|10:33
 
|10:33
|Print ''' 'Hello Perl' '''
+
|''while''' લૂપ  અને  '''do-while''' લૂપ્સ વાપરીને
  
 
|-
 
|-
 
|10:35
 
|10:35
|till the count of variable reaches 10  
+
| જ્યાં શુધી વેરીએબલ ની ગણતરી 10 શુધી ના પહોચે.
  
 
|-
 
|-
 
|10:38
 
|10:38
|by using '''while''' loop and '''do-while''' loops
+
| ''' 'Hello Perl' ''' પ્રિન્ટ કરો. 
  
 
|-
 
|-
 
|10:41
 
|10:41
|Watch the video available at the following link
+
|આપેલ લીંક પર ઉપલબ્ધ વિડીયો નિહાળો.
  
 
|-
 
|-
 
|10:45
 
|10:45
|It summaries the Spoken Tutorial project
+
|તે સ્પોકન ટ્યુટોરીયલ પ્રોજેક્ટનો સારાંશ આપે છે.
 
   
 
   
 
|-
 
|-
 
|10:49
 
|10:49
|If you do not have good bandwidth, you can download and watch it
+
|જો તમારી પાસે સારી બેન્ડવિડ્થ ન હોય તો, તમે વિડીયો ડાઉનલોડ કરીને જોઈ શકો છો. 
 
   
 
   
 
|-
 
|-
 
| 10:53
 
| 10:53
The Spoken Tutorial Project Team
+
સ્પોકન ટ્યુટોરીયલ પ્રોજેક્ટ ટીમ
  
 
|-
 
|-
 
| 10:56
 
| 10:56
| Conducts workshops using spoken tutorials
+
|સ્પોકન ટ્યુટોરીયલોનાં ઉપયોગથી વર્કશોપોનું આયોજન કરે છે.
  
 
|-
 
|-
 
|11:00
 
|11:00
|Gives certificates to those who pass an online  test
+
|જેઓ ઓનલાઈન પરીક્ષા પાસ કરે છે તેઓને પ્રમાણપત્રો આપે છે.
 
    
 
    
 
|-
 
|-
 
|11:04
 
|11:04
|For more details, please write to contact at spoken hyphen tutorial dot org
+
|વધુ વિગતો માટે, કૃપા કરી contact@spoken-tutorial.org પર લખો
 
   
 
   
 
|-
 
|-
 
| 11:12
 
| 11:12
Spoken Tutorial Project is a part of the Talk to a  Teacher project
+
સ્પોકન ટ્યુટોરીયલ પ્રોજેક્ટ ટોક ટુ અ ટીચર પ્રોજેક્ટનો એક ભાગ છે.
 
+
 
|-
 
|-
 
|11:17
 
|11:17
|It is supported by the National Mission on Education through ICT, MHRD, Government of India.
+
|જેને આઈસીટી, એમએચઆરડી, ભારત સરકાર મારફતે શિક્ષણ પર નેશનલ મિશન દ્વારા આધાર અપાયેલ છે.  
 
   
 
   
 
|-
 
|-
 
|11:24
 
|11:24
|More information on this Mission is available spoken hyphen tutorial dot org slash NMEICT hyphen Intro
+
|આ મિશન પર વધુ માહિતી spoken hyphen tutorial dot org slash NMEICT hyphen Intro આ લીંક પર ઉપલબ્ધ છે.
 
   
 
   
 
|-
 
|-
 
| 11:36
 
| 11:36
Hope you enjoyed this Perl tutorial.  
+
આશા રાખું છું કે તમને આ પર્લ ટ્યુટોરીયલ ગમ્યું હશે.
 
   
 
   
 
|-
 
|-
 
|11:38
 
|11:38
|This is Amol Brahmankar signing off.
+
|આઈઆઈટી બોમ્બે તરફથી હું, જ્યોતી સોલંકી વિદાય લઉં છું.  
 
   
 
   
 
|-
 
|-
 
|11:40
 
|11:40
|Thanks for joining.
+
|જોડાવાબદ્દલ આભાર.  
 
   
 
   
 
|}
 
|}

Latest revision as of 17:50, 28 February 2017

Time Narration
00:01 પર્લમા while and do-while પરનાં સ્પોકન ટ્યુટોરીયલમાં સ્વાગત છે.
00:06 આ ટ્યુટોરીયલમાં, આપણે આપેલ વિશે શીખીશું;
00:09 પર્લમા while લૂપ.
00:11 પર્લમા do-while લૂપ હું વાપરી રહ્યી છું ઉબુન્ટુ લીનક્સ 12.04 ઓપરેટીંગ સીસ્ટમ અને પર્લ 5.14.2
00:20 તેમજ હું gedit ટેક્સ્ટ એડીટર પણ વાપરીશ.
00:24 તમે તમારા પસંદનું કોઈપણ ટેક્સ્ટ એડીટર વાપરી શકો છો.
00:28 તમને પર્લમાં વેરીએબલો અને કમેંટોની સામાન્ય જાણકારી હોવી અનિવાર્ય છે.
00:33 પર્લમાં for અને foreach લૂપ્સ નું જ્ઞાન હોવાથી વધારાના લાભ થશે.
00:38 સ્પોકન ટ્યુટોરીયલ વેબસાઈટ પર સંદર્ભિત સ્પોકન ટ્યુટોરીયલોનો સંદર્ભ લો.
00:43 Perl' પર્લમાં while લૂપ
00:45 કન્ડીશન ટ્રૂ હોય તો વ્હાઈલ લૂપ બ્લોક કોડને એક્ઝીક્યુટ કરશે.
00:50 વ્હાઈલ લૂપનું સિન્ટેક્સ આપ્યા પ્રમાણે છે-
00:53 while space ખુલ્લું કૌંસ condition બંધ કૌંસ
00:58 ખુલ્લું છગડીયા કૌંસ
01:00 કન્ડીશન ટ્રૂ થવાથી કોડનો ભાગ એક્ઝીક્યુટ થાય છે.
01:04 બંધ છગડીયા કૌંસ
01:07 કન્ડીશન સંતુષ્ટ ન હોય તો , શું થાય છે? તો વ્હાઈલ લૂપ એક વખત પણ એક્ઝીક્યુટ થયા વગર બાહર નીકળશે.
01:16 ચાલો વ્હાઈલ લૂપનું ઉદાહરણ જોઈએ.
01:19 ટર્મિનલ ખોલો અને ટાઈપ કરો;
01:22 gedit whileLoop dot pl space ampersand
01:29 Enter (એન્ટર) દબાવો.
01:31 gedit. મા whileLoop.pl ફાઈલ ખોલશે.
01:34 હવે આપેલ કોડ ટાઈપ કરો.
01:37 hash exclamation mark slash u s r slash bin slash perl
01:45 Enter (એન્ટર) દબાવો.
01:47 dollar i is equal to zero semicolon
01:52 Enter (એન્ટર) દબાવો.
01:54 while ખુલ્લું કૌંસ dollar i less than or equal to four બંધ કૌંસ space
02:04 ખુલ્લો છગડીયો કૌંસ enter દબાવો.
02:08 print space double quote Value of i colon, dollar i slash n close double quote semicolon
02:20 Enter (એન્ટર) દબાવો.
02:22 dollar i plus plus semicolon
02:27 Enter (એન્ટર) દબાવો. છગડીયા કૌંસને બંધ કરો.
02:31 ચાલો હું વ્હાઈલ લૂપને સારાંશમા સમજાવું.
02:33 આપણે બેરીએબલ i ને 0 થી ઈનીશલાઈઝ કર્યું છે.
02:38 હવે આપણે વ્હાઈલ લૂપને $i less than or equal to 4. આ કન્ડીશન નિર્દિષ્ટ કરીછે.
02:46 જો કન્ડીશન ટ્રૂ હોય તો વ્હાઈલ લૂપ અંતર્ગત આવેલ કોડ એક્ઝીક્યુટ થશે.
02:52 એટેલેકે તે ટર્મિનલ પર પ્રથવાર 'Value of i: 0' પ્રિન્ટ કરે છે.
03:01 પછી $i++ વેરીએબલની વેલ્યુ એકથી વધાવશે.
03:08 હવે ફરીથી લૂપ કન્ડીશન $i<=4 નું મૂલ્યાંકન કરવામાં આવશે.
03:16 અને એકવાર જો I ની કિંમત 5 બની જાય છે લૂપ બહાર નીકળવા કરશે.
03:22 આ કિસ્સામાં ,વ્હાઈલ લૂપ i equal to 0, 1, 2, 3, 4. માટે એક્ઝીક્યુટ થશે.
03:32 ફાઈલને સંગ્રહવા માટે Ctrl+S દબાવો.
03:35 હવે, ટર્મિનલ પર સ્વીચ કરો.
03:37 કોઈપણ કમ્પાઈલેશન અથવા સિન્ટેક્સ એરર છે કે તે તપાસવા માટે ટાઈપ કરો:
03:42 perl hyphen c whileLoop dot pl
03:47 અને Enter (એન્ટર) દબાવો.
03:49 આપેલ લાઈન ટર્મિનલ પર દ્રશ્યમાન થાય છે.
03:52 whileLoop.pl syntax OK
03:56 કોઈપણ કમ્પાઈલેશન અથવા સિન્ટેક્સ એરર ન હોવાથી આપણે આ ટાઈપ કરીને પર્લ સ્ક્રીપ્ટ એક્ઝીક્યુટ કરીશું -
04:02 perl whileLoop dot pl
04:06 અને Enter (એન્ટર) દબાવો.
04:09 ટર્મિનલ પર આપેલ આઉટપુટ દેખાશે.
04:14 હવે ચાલો do-while loop જોઈએ.
04:20 સ્ટેટમેંટ હમેશા 'do...while ઓછામાં ઓછી એક વાર કોડના ભાગ ને એક્ઝીક્યુટ કરશે.
04:25 જયારે કન્ડીશન ટ્રૂ હોય તો તે પછી કન્ડીશન તપાસી અને લૂપને રીપીટ કરશે.
04:30 do-while લૂપનું સિન્ટેક્સ આપ્યા પ્રમાણે છે -
04:34 do space
04:36 ખુલ્લો છગડીયો કૌંસ
04:38 કન્ડીશન ટ્રૂ થવા પર એક્ઝીક્યુટ કોડનાં ભાગ.
04:42 બંધ છગડીયો કૌંસ પછી સ્પેસ
04:45 while space within brackets condition અને પછી semicolon
04:50 ટર્મિનલ ખોલો અને ટાઈપ કરો;
04:54 gedit doWhileLoop dot pl space ampersand
05:03 અને Enter (એન્ટર) દબાવો.
05:05 તે gedit. મા doWhileLoop.pl ફાઈલ ખોલશે.
05:09 કોડનાં આ ભાગને ટાઈપ કરો -
05:11 hash exclamation mark slash u s r slash bin slash perl Enter દબાવો.
05:21 dollar i equals to zero semicolon એન્ટર દબાવો.
05:27 do space
05:29 ખુલ્લો છગડીયો કૌંસ એન્ટર ટાઈપ કરો.
05:33 print space double quote Value of i colon space dollar i slash n close double quote semicolon
05:46 એન્ટર દબાવો.
05:48 dollar i plus plus semicolon
05:52 એન્ટર દબાવો.
05:54 બંધ છગડીયો કૌંસ.
05:56 space while space open bracket dollar i less than or equal to four
06:06 બંદ કૌંસ semicolon
06:10 અહી do-while લૂપ વિષે વિગતમા સમજૂતી છે. .
06:13 આપણે i ને 0. થી ઈનીશીલાઈઝડ કરીશું.
06:18 પ્રથમ વખત કન્ડીશન તપાસ્યા વિના ડુ વ્હાઈલ લૂપ 'Value of i colon 0' તરીકે આઉટપુટ પ્રિન્ટ કરશે.
06:28 દરેક વખતે લૂપ એક્ઝીક્યુટ થવા પર $i++ વેરીએબલ i ની વેલ્યુ એકથી વધાવશે.
06:36 બીજી વાર '$i less than or equal to 4' આ કન્ડીશન તપાસશે.
06:43 જો કન્ડીશન ટ્રૂ હોય તો લૂપ ફરીથી એક્ઝીક્યુટ થશે.
06:48 આપણા કિસ્સામાં બીજી વખત ટર્મિનલ પર 'Value of i colon 1' .આ આઉટપુટ દ્રશ્યમાન થશે.
06:57 કન્ડીશન falseથતા સુધી એટલેકે વેરીએબલ 5 થતા સુધી લૂપ એક્ઝીક્યુટ થશે.
07:05 ફાઈલને સંગ્રહવા માટે Ctrl+S દબાવો.
07:09 હવે, ટર્મિનલ પર સ્વીચ કરો. કોઈપણ કમ્પાઈલેશન અથવા સિન્ટેક્સ એરર છે કે તે તપાસવા માટે ટાઈપ કરો:
07:16 perl hyphen c doWhileLoop dot pl
07:21 અને Enter (એન્ટર) દબાવો.
07:23 આપેલ લાઈન ટર્મિનલ પર દ્રશ્યમાન થશે.
07:26 doWhileLoop.pl syntax OK
07:30 કોઈપણ કમ્પાઈલેશન અથવા સિન્ટેક્સ એરર ન હોવાથી આપણે આ ટાઈપ કરીને પર્લ સ્ક્રીપ્ટ એક્ઝીક્યુટ કરીશું -
07:36 ટાઈપ કરો perl doWhileLoop dot pl
07:41 અને Enter (એન્ટર) દબાવો.


07:43 ટર્મિનલ પર આપેલ આઉટપુટ દ્રશયમાન થશે.
07:48 ચાલો હવે while અને do-while લૂપ્સ વચ્ચે વાસ્તવિક તફાવત જોઈએ.
07:53 ટર્મિનલ ખોલો અને ટાઈપ કરો -
07:55 gedit loop dot pl space ampersand
08:01 અને Enter (એન્ટર) દબાવો.
08:03 gedit. મા loop dot pl ફાઈલ ખોલશે.
08:07 હવે બતાવેલ કોડનો ભાગ ટાઈપ કરો.
08:12 આપણે count વેરીએબલ ડીકલેર કર્યું અને તેને ઝીરોથી ઈનીશીલાઈઝ કર્યું.
08:19 વ્હાઈલ લૂપ કન્ડીશન મા આપણે તપાસીએ છીએ કે વેરીએબલ count એ ઝીરો કરતા મોટું છે કે.
08:29 કન્ડીશન ટ્રૂ નથી.તો વ્હાઈલ લૂપ કન્ડીશન એક વાર પણ એક્ઝીક્યુટ નહી થાય.
08:36 do...while લૂપ મા આપણે કોડ પહેલા એક્ઝીક્યુટ કરીએ છીએ અને પછી કન્ડીશન તપાસીએ છીએ.
08:44 તો કોડ એક વખત તો એક્ઝીક્યુટ થશે.
08:49 પછી કન્ડીશન count' વેરીએબલ ઝીરો કરતા મોટું છે કે તે તપાસ્યું છે.
08:57 કન્ડીશન ટ્રૂ નથી.તો લૂપ બહાર નીકળશે.
09:02 ફાઈલને સંગ્રહવા માટે Ctrl+S દબાવો.
09:05 હવે, ટર્મિનલ પર સ્વીચ કરો અને કોઈપણ કમ્પાઈલેશન અથવા સિન્ટેક્સ એરર છે કે તે તપાસવા માટે ટાઈપ કરો:
09:12 perl hyphen c loop dot pl
09:16 અને Enter (એન્ટર) દબાવો.
09:19 આપેલ લાઈન ટર્મિનલ પર દ્રશ્યમાન થશે.
09:22 loop dot pl syntax OK
09:26 કોઈપણ કમ્પાઈલેશન અથવા સિન્ટેક્સ એરર ન હોવાથી આપણે આ ટાઈપ કરીને પર્લ સ્ક્રીપ્ટ એક્ઝીક્યુટ કરીશું -


09:31 ટાઈપ કરો perl loop dot pl
09:36 અને Enter (એન્ટર) દબાવો.
09:38 ટર્મિનલ પર આપેલ આઉટપુટ દ્રશયમાન થશે.
09:43 I am in do-while loop
09:46 અહી આપણે જોઈએ શકીએ છીએ અહી 'I am in while loop' જવું કોઈ પણ આઉટપુટ મેસેજ દ્રશ્યમાન નથી
09:52 આ મેસેજ જે આપણે વ્હાઈલ લૂપમા પ્રિન્ટ કરવા આપ્યો હતો તે છે.
09:59 આ સૂચિત કરે છે.
10:01 do-while લૂપ કન્ડીશન મૂલ્યાંકન કરવા પહેલા ઓછા મા ઓછી એક વખત એક્ઝીક્યુટ કરે છે.
10:07 જો આપેલ કન્ડીશન false હોય તો વ્હાઈલ લૂપ એક વખત પણ એક્ઝીક્યુટ થશે નહી.
10:15 મને આશા છે કે હવે તમને તફાવત ખબર પડી ગયી છે.
10:18 while અને do-while લૂપ્સ પર બસ આટલું જ.
10:22 સારાંશ માં.
10:24 આ ટ્યુટોરીયલમાં, આપણે શીખ્યા છે -
10:26 લૂપ પર્લમાં while' લૂપ અને do-while
10:29 સેમ્પલ પ્રોગ્રામ વાપરતા .
10:31 અહીં તમારા માટે અસાઇનમેન્ટ છે -
10:33 while' લૂપ અને do-while લૂપ્સ વાપરીને
10:35 જ્યાં શુધી વેરીએબલ ની ગણતરી 10 શુધી ના પહોચે.
10:38 'Hello Perl' પ્રિન્ટ કરો.
10:41 આપેલ લીંક પર ઉપલબ્ધ વિડીયો નિહાળો.
10:45 તે સ્પોકન ટ્યુટોરીયલ પ્રોજેક્ટનો સારાંશ આપે છે.
10:49 જો તમારી પાસે સારી બેન્ડવિડ્થ ન હોય તો, તમે વિડીયો ડાઉનલોડ કરીને જોઈ શકો છો.
10:53 સ્પોકન ટ્યુટોરીયલ પ્રોજેક્ટ ટીમ
10:56 સ્પોકન ટ્યુટોરીયલોનાં ઉપયોગથી વર્કશોપોનું આયોજન કરે છે.
11:00 જેઓ ઓનલાઈન પરીક્ષા પાસ કરે છે તેઓને પ્રમાણપત્રો આપે છે.
11:04 વધુ વિગતો માટે, કૃપા કરી contact@spoken-tutorial.org પર લખો
11:12 સ્પોકન ટ્યુટોરીયલ પ્રોજેક્ટ ટોક ટુ અ ટીચર પ્રોજેક્ટનો એક ભાગ છે.
11:17 જેને આઈસીટી, એમએચઆરડી, ભારત સરકાર મારફતે શિક્ષણ પર નેશનલ મિશન દ્વારા આધાર અપાયેલ છે.
11:24 આ મિશન પર વધુ માહિતી spoken hyphen tutorial dot org slash NMEICT hyphen Intro આ લીંક પર ઉપલબ્ધ છે.
11:36 આશા રાખું છું કે તમને આ પર્લ ટ્યુટોરીયલ ગમ્યું હશે.
11:38 આઈઆઈટી બોમ્બે તરફથી હું, જ્યોતી સોલંકી વિદાય લઉં છું.
11:40 જોડાવાબદ્દલ આભાર.

Contributors and Content Editors

Jyotisolanki, PoojaMoolya