Difference between revisions of "Ruby/C3/while-and-until-Looping-Statements/Kannada"

From Script | Spoken-Tutorial
Jump to: navigation, search
(Created page with " {| border=1 | '''Time''' | '''Narration''' |- | 00:01 | 'Ruby' (ರೂಬಿ) ಯಲ್ಲಿ, '''while and until loops''' ಎಂಬ 'ಸ್ಪೋಕನ್ ಟ್ಯುಟ...")
 
Line 78: Line 78:
 
|-
 
|-
 
| 01:13
 
| 01:13
|Now, let us switch to the '''terminal''' and type: ''' gedit space while hyphen loop dot rb space &''' (ampersand)
+
|ಈಗ, ನಾವು ಟರ್ಮಿನಲ್ ಗೆ ಬದಲಾಯಿಸಿ ಹೀಗೆ ಟೈಪ್ ಮಾಡೋಣ : 'gedit space while hyphen loop dot rb space &' (ampersand)
 
|-
 
|-
 
| 01:24
 
| 01:24
Line 84: Line 84:
 
|-
 
|-
 
| 01:28
 
| 01:28
|I have declared a ''' while''' loop in this example.  
+
|ಈ ಉದಾಹರಣೆಯಲ್ಲಿ, ನಾನು ಒಂದು 'while ಲೂಪ್'ಅನ್ನು ಡಿಕ್ಲೇರ್ ಮಾಡಿದ್ದೇನೆ.
 
|-
 
|-
 
|  01:32
 
|  01:32
| First, I declared a local variable 'i' and initialized it with value 0.  
+
| ಮೊದಲು, ನಾನು 'i' ಎಂಬ ಒಂದು 'ಲೋಕಲ್ ವೇರಿಯೆಬಲ್'ಅನ್ನು ಡಿಕ್ಲೇರ್ ಮಾಡಿ ಅದನ್ನು ಸೊನ್ನೆಗೆ (0) ಇನಿಶಿಯಲೈಸ್ ಮಾಡಿದ್ದೇನೆ.  
 
|-
 
|-
 
|  01:38
 
|  01:38
|Then I declare a ''''while' loop.'''
+
|ಆಮೇಲೆ, ಒಂದು 'while ಲೂಪ್'ಅನ್ನು ಡಿಕ್ಲೇರ್ ಮಾಡುತ್ತೇನೆ.
 
|-
 
|-
 
|  01:41
 
|  01:41
Line 96: Line 96:
 
|-
 
|-
 
| 01:46
 
| 01:46
| The '''puts''' '''method''', declared within the ''' while''' loop, will display the output.  
+
| 'while ಲೂಪ್'ನ ಒಳಗಡೆ ಡಿಕ್ಲೇರ್ ಮಾಡಲಾದ 'puts' ಮೆಥಡ್, ಔಟ್ಪುಟ್ ಅನ್ನು ತೋರಿಸುವುದು.  
 
|-
 
|-
 
|  01:51
 
|  01:51
Line 117: Line 117:
 
|-
 
|-
 
| 02:16
 
| 02:16
| Now, let us switch to the '''terminal''' and type: '''ruby space while hyphen loop dot rb''' and see the output.  
+
| ಈಗ, ನಾವು ಟರ್ಮಿನಲ್ ಗೆ ಬದಲಾಯಿಸಿ ಹೀಗೆ ಟೈಪ್ ಮಾಡೋಣ: 'ruby space while hyphen loop dot rb' ಮತ್ತು ಔಟ್ಪುಟ್ ಅನ್ನು ನೋಡೋಣ.
 
|-
 
|-
 
|  02:30
 
|  02:30
Line 132: Line 132:
 
|-
 
|-
 
|  02:45
 
|  02:45
|''' until “boolean expression”'''
+
|'until “boolean expression”'
 
|-
 
|-
 
| 02:47
 
| 02:47
|''' ruby code '''
+
|' ruby code '
 
|-
 
|-
 
|  02:48
 
|  02:48
| '''end'''
+
| 'end'
 
|-
 
|-
 
| 02:50
 
| 02:50
Line 144: Line 144:
 
|-
 
|-
 
| 02:52
 
| 02:52
| Now,let us switch to the '''terminal''' and type: ''' gedit space until hyphen loop dot rb space &''' (ampersand)
+
| ಈಗ, ನಾವು ಟರ್ಮಿನಲ್ ಗೆ ಬದಲಾಯಿಸಿ ಹೀಗೆ ಟೈಪ್ ಮಾಡೋಣ:: 'gedit space until hyphen loop dot rb space &' (ampersand)
 
|-
 
|-
 
| 03:03
 
| 03:03
|You can pause the tutorial and type the code as we go through it.  
+
|ನಾವು ಇದರಲ್ಲಿ ಮುಂದುವರಿಯುತ್ತಿದ್ದಂತೆ, ನೀವು ಟ್ಯುಟೋರಿಯಲ್ ಅನ್ನು ನಿಲ್ಲಿಸಿ (pause) ಕೋಡ್ ಅನ್ನು ಟೈಪ್ ಮಾಡಬಹುದು.  
 
|-
 
|-
 
|  03:07
 
|  03:07
Line 183: Line 183:
 
|-
 
|-
 
| 03:51
 
| 03:51
|Now, switch to the ''' terminal''' and type: ''' ruby space until hyphen loop dot rb''' and see the output.  
+
|ಈಗ, ನಾವು ಟರ್ಮಿನಲ್ ಗೆ ಬದಲಾಯಿಸಿ ಹೀಗೆ ಟೈಪ್ ಮಾಡೋಣ: 'ruby space until hyphen loop dot rb' ಮತ್ತು ಔಟ್ಪುಟ್ ಅನ್ನು ನೋಡೋಣ.  
 
|-
 
|-
 
|  04:03
 
|  04:03
Line 204: Line 204:
 
|-
 
|-
 
| 04:27
 
| 04:27
|'''ruby code '''
+
|'ruby code '
 
|-
 
|-
 
| 04:28
 
| 04:28
|'''redo'''
+
|'redo'
 
|-
 
|-
 
| 04:29
 
| 04:29
|'''end conditional'''
+
|'end conditional'
 
|-
 
|-
 
|  04:30
 
|  04:30
| '''end''' loop  
+
| 'end' loop  
 
|-
 
|-
 
|  04:32
 
|  04:32
Line 219: Line 219:
 
|-
 
|-
 
|  04:35
 
|  04:35
|Now, let us switch to the '''terminal''' and type: '''gedit space redo hyphen loop dot rb space &'''(ampersand )
+
|ಈಗ, ನಾವು ಟರ್ಮಿನಲ್ ಗೆ ಬದಲಾಯಿಸಿ ಹೀಗೆ ಟೈಪ್ ಮಾಡೋಣ: 'gedit space redo hyphen loop dot rb space &'(ampersand )
 
|-
 
|-
 
| 04:48
 
| 04:48
Line 253: Line 253:
 
| 05:31
 
| 05:31
 
|It will do so, without checking the '''loop condition'''.  
 
|It will do so, without checking the '''loop condition'''.  
 
 
|-
 
|-
 
| 05:34
 
| 05:34
Line 262: Line 261:
 
|-
 
|-
 
|05:43
 
|05:43
|Let's switch to the '''terminal''' and type: '''ruby space redo hyphen loop dot rb'''
+
|ಈಗ, ನಾವು ಟರ್ಮಿನಲ್ ಗೆ ಬದಲಾಯಿಸಿ ಹೀಗೆ ಟೈಪ್ ಮಾಡೋಣ: 'ruby space redo hyphen loop dot rb'
 
|-
 
|-
 
| 05:52
 
| 05:52
|and see the output.  
+
|ಮತ್ತು ಔಟ್ಪುಟ್ ಅನ್ನು ನೋಡೋಣ.
 
|-
 
|-
 
| 05:53
 
| 05:53
Line 280: Line 279:
 
|-
 
|-
 
| 06:10
 
| 06:10
| '''a looping statement'''
+
| 'a looping statement'
 
|-
 
|-
 
|  06:12
 
|  06:12
| '''a conditional statement '''
+
| 'a conditional statement '
+
 
|-
 
|-
 
| 06:13
 
| 06:13
|'''break '''
+
|'break '
 
|-
 
|-
 
| 06:14
 
| 06:14
|'''end conditional '''
+
|'end conditional '
 
|-
 
|-
 
|  06:16
 
|  06:16
|'''ruby code'''
+
|'ruby code'
 
|-
 
|-
 
| 06:17
 
| 06:17
|'''end loop '''
+
|'end loop'
 
   
 
   
 
|-
 
|-
Line 303: Line 301:
 
|-
 
|-
 
|  06:21
 
|  06:21
|Now, let us switch to the '''terminal''' and type: '''gedit space break hyphen loop dot rb space ampersand.'''
+
|ಈಗ, ನಾವು ಟರ್ಮಿನಲ್ ಗೆ ಬದಲಾಯಿಸಿ ಹೀಗೆ ಟೈಪ್ ಮಾಡೋಣ: 'gedit space break hyphen loop dot rb space ampersand.'
 
|-
 
|-
 
| 06:33
 
| 06:33
Line 324: Line 322:
 
|-
 
|-
 
| 06:59
 
| 06:59
|Now, open the '''terminal''' and type:  
+
|ಈಗ, ಟರ್ಮಿನಲ್ ಅನ್ನು ಓಪನ್ ಮಾಡಿ ಹೀಗೆ ಟೈಪ್ ಮಾಡಿ:  
 
|-
 
|-
 
| 07:02
 
| 07:02
|'''ruby space break hyphen loop dot rb '''
+
|'ruby space break hyphen loop dot rb'
 
|-
 
|-
 
| 07:05
 
| 07:05
|and see the output.  
+
|ಮತ್ತು ಔಟ್ಪುಟ್ ಅನ್ನು ನೋಡಿ.  
 
|-
 
|-
 
| 07:08
 
| 07:08
Line 336: Line 334:
 
|-
 
|-
 
| 07:13
 
| 07:13
|Now you should be able to create your own '''break''' construct.  
+
|ಈಗ, ನಿಮ್ಮ ಸ್ವಂತದ 'break' ಕನ್ಸ್ಟ್ರಕ್ಟ್ ಅನ್ನು ಕ್ರಿಯೇಟ್ ಮಾಡಲು ನಿಮಗೆ ಸಾಧ್ಯವಾಗಬೇಕು.  
 
|-
 
|-
 
| 07:17
 
| 07:17
|This brings us to the end of this Spoken Tutorial.  
+
|ಇದರೊಂದಿಗೆ, ನಾವು ಈ ಸ್ಪೋಕನ್ ಟ್ಯುಟೋರಿಯಲ್ ನ ಕೊನೆಗೆ ಬಂದಿರುತ್ತೇವೆ.
 
|-
 
|-
 
| 07:20
 
| 07:20
|Let's summarize.
+
|ಸಂಕ್ಷಿಪ್ತವಾಗಿ, 
 
|-
 
|-
 
| 07:22
 
| 07:22
|In this tutorial, we have learnt to use:  
+
|ಈ ಟ್ಯುಟೋರಿಯಲ್ ನಲ್ಲಿ, ನಾವು:  
 
|-
 
|-
 
| 07:24
 
| 07:24
|* '''while''' loop
+
|* 'while' ಲೂಪ್
 
|-
 
|-
 
| 07:25
 
| 07:25
|* '''until''' construct
+
|* 'until' ಕನ್ಸ್ಟ್ರಕ್ಟ್
 
|-
 
|-
 
| 07:26
 
| 07:26
|* '''redo'''
+
|* 'redo'
 
|-
 
|-
 
| 07:27
 
| 07:27
|* '''break''' construct.  
+
|* 'break' ಕನ್ಸ್ಟ್ರಕ್ಟ್ ಇವುಗಳನ್ನು ಉಪಯೋಗಿಸಲು ಕಲಿತಿದ್ದೇವೆ.
 
|-
 
|-
 
| 07:29
 
| 07:29
|As as assignment-  
+
|ಒಂದು ಅಸೈನ್ಮೆಂಟ್ -
 
|-
 
|-
 
| 07:31
 
| 07:31
Line 366: Line 364:
 
|-
 
|-
 
| 07:38
 
| 07:38
|Write a Ruby program using
+
|ಒಂದು 'Ruby' ಪ್ರೊಗ್ರಾಂಅನ್ನು ಬರೆಯಿರಿ  using
 
|-
 
|-
 
| 07:40
 
| 07:40
Line 384: Line 382:
 
|-
 
|-
 
|  08:00
 
|  08:00
Watch the video available at the following link.
+
ಈ ಕೆಳಗಿನ ಲಿಂಕ್ ನಲ್ಲಿ ಲಭ್ಯವಿರುವ ವೀಡಿಯೋವನ್ನು ವೀಕ್ಷಿಸಿ.
 
|-
 
|-
 
| 08:03
 
| 08:03
|It summarizes the Spoken Tutorial project.
+
|ಇದು “ಸ್ಪೋಕನ್ ಟ್ಯುಟೋರಿಯಲ್” ಪ್ರಕಲ್ಪದ ಸಾರಾಂಶವಾಗಿದೆ.
 
|-
 
|-
 
| 08:07
 
| 08:07
|If you do not have good bandwidth, you can download and  watch it.  
+
|ನಿಮಗೆ ಒಳ್ಳೆಯ ‘ಬ್ಯಾಂಡ್ವಿಡ್ತ್’ ಸಿಗದಿದ್ದರೆ, ನೀವು ಇದನ್ನು ಡೌನ್ಲೋಡ್ ಮಾಡಿ ನೋಡಬಹುದು.  
 
|-
 
|-
 
|  08:10
 
|  08:10
The Spoken Tutorial project team:
+
“ಸ್ಪೋಕನ್ ಟ್ಯುಟೋರಿಯಲ್” ಪ್ರಕಲ್ಪದ ತಂಡವು:
 
|-   
 
|-   
 
| 08:13
 
| 08:13
|* Conducts workshops using spoken tutorials.  
+
|* ‘ಸ್ಪೋಕನ್ ಟ್ಯುಟೋರಿಯಲ್’ಗಳನ್ನು ಬಳಸಿ ಕಾರ್ಯಶಾಲೆಗಳನ್ನು ನಡೆಸುತ್ತದೆ.
 
|-
 
|-
 
|08:15
 
|08:15
|* Gives certificates to those who pass an online test.  
+
|* ಆನ್-ಲೈನ್ ಪರೀಕ್ಷೆಯಲ್ಲಿ ಉತ್ತೀರ್ಣರಾದವರಿಗೆ ಪ್ರಮಾಣಪತ್ರವನ್ನು ಕೊಡುತ್ತದೆ.  
 
|-
 
|-
 
| 08:19
 
| 08:19
|For more details, please write to contact@spoken-tutorial.org
+
|ಹೆಚ್ಚಿನ ಮಾಹಿತಿಗಾಗಿ, ದಯವಿಟ್ಟು ಈ ಲಿಂಕ್ ಗೆ ಬರೆಯಿರಿ:
 +
'''contact@spoken-tutorial.org'''
 
|-
 
|-
 
|  08:25
 
|  08:25
'''Spoken Tutorial''' project is a part of the '''Talk to a Teacher''' project.
+
"ಸ್ಪೋಕನ್ ಟ್ಯುಟೋರಿಯಲ್" ಪ್ರಕಲ್ಪವು “ಟಾಕ್ ಟು ಎ ಟೀಚರ್” ಪ್ರಕಲ್ಪದ ಒಂದು ಭಾಗವಾಗಿದೆ.
 
|-
 
|-
 
| 08:29
 
| 08:29
|It is supported by the National Mission on Education through ICT, MHRD, Government of India.
+
|ಇದು ICT, MHRD ಮೂಲಕ ರಾಷ್ಟ್ರೀಯ ಸಾಕ್ಷರತಾ ಮಿಷನ್, ಭಾರತ ಸರ್ಕಾರದ ಆಧಾರವನ್ನು ಪಡೆದಿದೆ.
 
|-
 
|-
 
| 08:35
 
| 08:35
|More information on this mission is available at spoken hyphen tutorial dot org slash NMEICT hyphen Intro.
+
|ಈ ಮಿಷನ್ ನ ಬಗ್ಗೆ ಹೆಚ್ಚಿನ ಮಾಹಿತಿಯು ಈ ಕೆಳಗಿನ ಲಿಂಕ್ ನಲ್ಲಿ ಲಭ್ಯವಿರುತ್ತದೆ:
 +
spoken hyphen tutorial dot org slash NMEICT hyphen Intro.
 
|-
 
|-
 
| 08:44
 
| 08:44
| This is Anjana Nair, signing off. Thank you.
+
| IIT Bombay ಯಿಂದ, ಸ್ಕ್ರಿಪ್ಟ್ ನ ಅನುವಾದಕಿ ಸಂಧ್ಯಾ ಪುಣೇಕರ್ ಹಾಗೂ ಪ್ರವಾಚಕ ----------- . ವಂದನೆಗಳು.  
 
|}
 
|}
 
----------------------------------------------------------------
 
----------------------------------------------------------------

Revision as of 23:03, 2 January 2016

Time Narration
00:01 'Ruby' (ರೂಬಿ) ಯಲ್ಲಿ, while and until loops ಎಂಬ 'ಸ್ಪೋಕನ್ ಟ್ಯುಟೋರಿಯಲ್' ಗೆ ನಿಮಗೆ ಸ್ವಾಗತ.
00:06 ಈ ಟ್ಯುಟೋರಿಯಲ್ ನಲ್ಲಿ ನಾವು:
00:09 * 'while' ಲೂಪ್
00:10 * 'until' ಲೂಪ್
00:11 * 'redo' (ರೀ-ಡು) ಮತ್ತು
00:12 * 'break' ಇವುಗಳನ್ನು ಬಳಸಲು ಕಲಿಯುವೆವು.
00:13 ನಾವು:
00:14 * Ubuntu ಆವೃತ್ತಿ 12.04
00:17 * Ruby 1.9.3 ಇವುಗಳನ್ನು ಬಳಸುತ್ತಿದ್ದೇವೆ.
00:20 ಈ ಟ್ಯುಟೋರಿಯಲ್ ಅನ್ನು ಅನುಸರಿಸಲು, ನೀವು 'ಇಂಟರ್ನೆಟ್'ನ ಸಂಪರ್ಕವನ್ನು ಪಡೆದಿರಬೇಕು.
00:25 'Linux' ಕಮಾಂಡ್ ಗಳು, ‘ಟರ್ಮಿನಲ್’ ಮತ್ತು 'ಟೆಕ್ಸ್ಟ್ ಎಡಿಟರ್' ಗಳನ್ನು ಸಹ ನೀವು ತಿಳಿದಿರಬೇಕು.
00:29 ಇಲ್ಲದಿದ್ದರೆ, ಸಂಬಂಧಿತ ಟ್ಯುಟೋರಿಯಲ್ ಗಳಿಗಾಗಿ ದಯವಿಟ್ಟು ನಮ್ಮ ವೆಬ್ಸೈಟ್ ಗೆ ಭೆಟ್ಟಿಕೊಡಿ.
00:34 ನಾವು ಪ್ರಾರಂಭಿಸುವ ಮುನ್ನ, ಈಮೊದಲು ನಾವು “ttt” ಎಂಬ ಡಿರೆಕ್ಟರೀಯನ್ನು ಕ್ರಿಯೇಟ್ ಮಾಡಿದ್ದೆವು ಎಂಬುದನ್ನು ನೆನಪಿಸಿಕೊಳ್ಳಿ.
00:38 ನಾವು ಆ ಡಿರೆಕ್ಟರೀಗೆ ಹೋಗೋಣ.
00:41 ಆಮೇಲೆ, 'ruby hyphen tutorial' ಮತ್ತು 'looping hyphen statements' ಎಂಬ ಡಿರೆಕ್ಟರೀಗಳಿಗೆ ಹೋಗೋಣ.
00:46 ಈಗ ನಾವು ಅದೇ ಫೋಲ್ಡರ್ ನಲ್ಲಿ ಇರುವುದರಿಂದ ಮುಂದೆ ನಡೆಯೋಣ.
00:50 Ruby ಯಲ್ಲಿ, 'while' ಲೂಪ್ ನ ಸಿಂಟ್ಯಾಕ್ಸ್ ಈಕೆಳಗಿನಂತಿದೆ:
00:54 'while “boolean expression” '
00:56 'ruby code'
00:57 'end'
00:58 ನಾವು ಒಂದು ಉದಾಹರಣೆಯನ್ನು ನೋಡೋಣ.
01:01 ಪ್ರಾಥಮಿಕ ಹಂತದ Ruby tutorials ನಲ್ಲಿ ತೋರಿಸಿದಂತೆ, 'gedit' ನಲ್ಲಿ ಒಂದು ಹೊಸ ಫೈಲನ್ನು ಕ್ರಿಯೇಟ್ ಮಾಡಿ.
01:05 ಇದನ್ನು 'while hyphen loop dot rb' ಎಂದು ಹೆಸರಿಸಿ.
01:09 ನನ್ನ ಹತ್ತಿರ 'while' ಲೂಪ್ ನ ಒಂದು ಉದಾಹರಣೆ ಇದೆ.
01:13 ಈಗ, ನಾವು ಟರ್ಮಿನಲ್ ಗೆ ಬದಲಾಯಿಸಿ ಹೀಗೆ ಟೈಪ್ ಮಾಡೋಣ : 'gedit space while hyphen loop dot rb space &' (ampersand)
01:24 ನಾವು ಇದರಲ್ಲಿ ಮುಂದುವರಿಯುತ್ತಿದ್ದಂತೆ, ನೀವು ಟ್ಯುಟೋರಿಯಲ್ ಅನ್ನು ನಿಲ್ಲಿಸಿ (pause) ಕೋಡ್ ಅನ್ನು ಟೈಪ್ ಮಾಡಬಹುದು.
01:28 ಈ ಉದಾಹರಣೆಯಲ್ಲಿ, ನಾನು ಒಂದು 'while ಲೂಪ್'ಅನ್ನು ಡಿಕ್ಲೇರ್ ಮಾಡಿದ್ದೇನೆ.
01:32 ಮೊದಲು, ನಾನು 'i' ಎಂಬ ಒಂದು 'ಲೋಕಲ್ ವೇರಿಯೆಬಲ್'ಅನ್ನು ಡಿಕ್ಲೇರ್ ಮಾಡಿ ಅದನ್ನು ಸೊನ್ನೆಗೆ (0) ಇನಿಶಿಯಲೈಸ್ ಮಾಡಿದ್ದೇನೆ.
01:38 ಆಮೇಲೆ, ಒಂದು 'while ಲೂಪ್'ಅನ್ನು ಡಿಕ್ಲೇರ್ ಮಾಡುತ್ತೇನೆ.
01:41 This loop will execute as long as the variable 'i' is greater than -10.
01:46 'while ಲೂಪ್'ನ ಒಳಗಡೆ ಡಿಕ್ಲೇರ್ ಮಾಡಲಾದ 'puts' ಮೆಥಡ್, ಔಟ್ಪುಟ್ ಅನ್ನು ತೋರಿಸುವುದು.
01:51 After the output is displayed, we decrement the value of 'i' by 1.
01:56 'i' will adopt this decremented value before the next iteration.
02:01 The variable 'i' gets decremented in every iteration.
02:04 This goes on till 'i' reaches the value -10.
02:09 At this point, the 'while' condition fails.
02:12 It subsequently breaks out of the loop and stops printing the output.
02:16 ಈಗ, ನಾವು ಟರ್ಮಿನಲ್ ಗೆ ಬದಲಾಯಿಸಿ ಹೀಗೆ ಟೈಪ್ ಮಾಡೋಣ: 'ruby space while hyphen loop dot rb' ಮತ್ತು ಔಟ್ಪುಟ್ ಅನ್ನು ನೋಡೋಣ.
02:30 The output will consist of a list of numbers 0 through -9.
02:35 You should now be able to write your own while loop in Ruby.
02:40 Let's look at the until loop next.
02:43 The syntax for the until loop in Ruby is -
02:45 'until “boolean expression”'
02:47 ' ruby code '
02:48 'end'
02:50 Let us look at an example.
02:52 ಈಗ, ನಾವು ಟರ್ಮಿನಲ್ ಗೆ ಬದಲಾಯಿಸಿ ಹೀಗೆ ಟೈಪ್ ಮಾಡೋಣ:: 'gedit space until hyphen loop dot rb space &' (ampersand)
03:03 ನಾವು ಇದರಲ್ಲಿ ಮುಂದುವರಿಯುತ್ತಿದ್ದಂತೆ, ನೀವು ಟ್ಯುಟೋರಿಯಲ್ ಅನ್ನು ನಿಲ್ಲಿಸಿ (pause) ಕೋಡ್ ಅನ್ನು ಟೈಪ್ ಮಾಡಬಹುದು.
03:07 I have declared an until loop in this example.
03:12 We had declared a local variable 'i' and initialized it to 0.
03:16 Then we declare an until loop.
03:18 This loop will execute as long as the variable 'i' is greater than -10.
03:23 The 'puts' method will display the output.
03:27 After the output is displayed, value of 'i' is decremented by 1.
03:32 'i' will adopt this decremented value before the next iteration.
03:36 The variable 'i' gets decremented during every iteration.
03:40 This goes on till 'i' reaches the value -11.
03:43 At this point, the 'until' condition fails.
03:46 Subsequently, it breaks out of the loop and stops printing the output.
03:51 ಈಗ, ನಾವು ಟರ್ಮಿನಲ್ ಗೆ ಬದಲಾಯಿಸಿ ಹೀಗೆ ಟೈಪ್ ಮಾಡೋಣ: 'ruby space until hyphen loop dot rb' ಮತ್ತು ಔಟ್ಪುಟ್ ಅನ್ನು ನೋಡೋಣ.
04:03 The output will consist of a list of numbers 0 through -10.
04:08 You should now be able to write your own until loop in Ruby.
04:13 Let's now move on to the redo construct.
04:16 The syntax for redo in Ruby is as follows:
04:20 a collection of objects. each do item
04:25 a conditional statement
04:27 'ruby code '
04:28 'redo'
04:29 'end conditional'
04:30 'end' loop
04:32 I have a working example of the redo loop.
04:35 ಈಗ, ನಾವು ಟರ್ಮಿನಲ್ ಗೆ ಬದಲಾಯಿಸಿ ಹೀಗೆ ಟೈಪ್ ಮಾಡೋಣ: 'gedit space redo hyphen loop dot rb space &'(ampersand )
04:48 You can pause the tutorial and type the code as we go through it.
04:52 I have declared an each loop in this example.
04:55 We have declared an each loop to iterate through numbers 10 to 20.
05:00 Then, we define an if conditional statement.
05:04 The loop will execute for every number between 10 to 20.
05:08 It will enter the inner conditional if conditional block only if the value of 'i' is equal to 20.
05:15 The 'puts' method, declared within the each loop, displays the output.
05:20 Once the program enters the 'if' conditional block, it will first print the output.
05:24 Then it will execute redo.
05:28 redo will execute the iteration of the most internal loop.
05:31 It will do so, without checking the loop condition.
05:34 Our condition being if i == 20.
05:38 The result will be an infinite loop, since the value of 'i' will not change from 20.
05:43 ಈಗ, ನಾವು ಟರ್ಮಿನಲ್ ಗೆ ಬದಲಾಯಿಸಿ ಹೀಗೆ ಟೈಪ್ ಮಾಡೋಣ: 'ruby space redo hyphen loop dot rb'
05:52 ಮತ್ತು ಔಟ್ಪುಟ್ ಅನ್ನು ನೋಡೋಣ.
05:53 The output will consist of an infinite loop that never ends.
05:58 Press Ctrl + C to terminate the infinite loop.
06:03 Now, let us look at the break statement.
06:06 The syntax for the break statement in Ruby is -
06:10 'a looping statement'
06:12 'a conditional statement '
06:13 'break '
06:14 'end conditional '
06:16 'ruby code'
06:17 'end loop'
06:18 Let us look at an example.
06:21 ಈಗ, ನಾವು ಟರ್ಮಿನಲ್ ಗೆ ಬದಲಾಯಿಸಿ ಹೀಗೆ ಟೈಪ್ ಮಾಡೋಣ: 'gedit space break hyphen loop dot rb space ampersand.'
06:33 You can pause the tutorial and type the code as we go through this example.
06:38 I have declared an each loop in this example.
06:41 It is similar to the one we used earlier.
06:43 The 'puts' method here, will display the output for numbers 11 to 19.
06:49 Once the value becomes 20, the program enters the conditional 'if' block.
06:54 At this point, it will encounter the break statement and break out of the loop.
06:59 ಈಗ, ಟರ್ಮಿನಲ್ ಅನ್ನು ಓಪನ್ ಮಾಡಿ ಹೀಗೆ ಟೈಪ್ ಮಾಡಿ:
07:02 'ruby space break hyphen loop dot rb'
07:05 ಮತ್ತು ಔಟ್ಪುಟ್ ಅನ್ನು ನೋಡಿ.
07:08 The output will consist of numbers 10 through 19.
07:13 ಈಗ, ನಿಮ್ಮ ಸ್ವಂತದ 'break' ಕನ್ಸ್ಟ್ರಕ್ಟ್ ಅನ್ನು ಕ್ರಿಯೇಟ್ ಮಾಡಲು ನಿಮಗೆ ಸಾಧ್ಯವಾಗಬೇಕು.
07:17 ಇದರೊಂದಿಗೆ, ನಾವು ಈ ಸ್ಪೋಕನ್ ಟ್ಯುಟೋರಿಯಲ್ ನ ಕೊನೆಗೆ ಬಂದಿರುತ್ತೇವೆ.
07:20 ಸಂಕ್ಷಿಪ್ತವಾಗಿ,
07:22 ಈ ಟ್ಯುಟೋರಿಯಲ್ ನಲ್ಲಿ, ನಾವು:
07:24 * 'while' ಲೂಪ್
07:25 * 'until' ಕನ್ಸ್ಟ್ರಕ್ಟ್
07:26 * 'redo'
07:27 * 'break' ಕನ್ಸ್ಟ್ರಕ್ಟ್ ಇವುಗಳನ್ನು ಉಪಯೋಗಿಸಲು ಕಲಿತಿದ್ದೇವೆ.
07:29 ಒಂದು ಅಸೈನ್ಮೆಂಟ್ -
07:31 Consider a range of numbers 100 to 115(inclusive), represented as Fahrenheit.
07:38 ಒಂದು 'Ruby' ಪ್ರೊಗ್ರಾಂಅನ್ನು ಬರೆಯಿರಿ using
07:40 the appropriate loop construct
07:42 that uses the Fahrenheit to Celsius conversion formula
07:46 against the given range of numbers.
07:49 To display the output: “The temperature has reached a certain degree Celsius and has become unbearable”
07:55 when the temperature in Celsius is above 32 degree Celsius.
08:00 ಈ ಕೆಳಗಿನ ಲಿಂಕ್ ನಲ್ಲಿ ಲಭ್ಯವಿರುವ ವೀಡಿಯೋವನ್ನು ವೀಕ್ಷಿಸಿ.
08:03 ಇದು “ಸ್ಪೋಕನ್ ಟ್ಯುಟೋರಿಯಲ್” ಪ್ರಕಲ್ಪದ ಸಾರಾಂಶವಾಗಿದೆ.
08:07 ನಿಮಗೆ ಒಳ್ಳೆಯ ‘ಬ್ಯಾಂಡ್ವಿಡ್ತ್’ ಸಿಗದಿದ್ದರೆ, ನೀವು ಇದನ್ನು ಡೌನ್ಲೋಡ್ ಮಾಡಿ ನೋಡಬಹುದು.
08:10 “ಸ್ಪೋಕನ್ ಟ್ಯುಟೋರಿಯಲ್” ಪ್ರಕಲ್ಪದ ತಂಡವು:
08:13 * ‘ಸ್ಪೋಕನ್ ಟ್ಯುಟೋರಿಯಲ್’ಗಳನ್ನು ಬಳಸಿ ಕಾರ್ಯಶಾಲೆಗಳನ್ನು ನಡೆಸುತ್ತದೆ.
08:15 * ಆನ್-ಲೈನ್ ಪರೀಕ್ಷೆಯಲ್ಲಿ ಉತ್ತೀರ್ಣರಾದವರಿಗೆ ಪ್ರಮಾಣಪತ್ರವನ್ನು ಕೊಡುತ್ತದೆ.
08:19 ಹೆಚ್ಚಿನ ಮಾಹಿತಿಗಾಗಿ, ದಯವಿಟ್ಟು ಈ ಲಿಂಕ್ ಗೆ ಬರೆಯಿರಿ:

contact@spoken-tutorial.org

08:25 "ಸ್ಪೋಕನ್ ಟ್ಯುಟೋರಿಯಲ್" ಪ್ರಕಲ್ಪವು “ಟಾಕ್ ಟು ಎ ಟೀಚರ್” ಪ್ರಕಲ್ಪದ ಒಂದು ಭಾಗವಾಗಿದೆ.
08:29 ಇದು ICT, MHRD ಮೂಲಕ ರಾಷ್ಟ್ರೀಯ ಸಾಕ್ಷರತಾ ಮಿಷನ್, ಭಾರತ ಸರ್ಕಾರದ ಆಧಾರವನ್ನು ಪಡೆದಿದೆ.
08:35 ಈ ಮಿಷನ್ ನ ಬಗ್ಗೆ ಹೆಚ್ಚಿನ ಮಾಹಿತಿಯು ಈ ಕೆಳಗಿನ ಲಿಂಕ್ ನಲ್ಲಿ ಲಭ್ಯವಿರುತ್ತದೆ:

spoken hyphen tutorial dot org slash NMEICT hyphen Intro.

08:44 IIT Bombay ಯಿಂದ, ಸ್ಕ್ರಿಪ್ಟ್ ನ ಅನುವಾದಕಿ ಸಂಧ್ಯಾ ಪುಣೇಕರ್ ಹಾಗೂ ಪ್ರವಾಚಕ ----------- . ವಂದನೆಗಳು.

Outline:

  • while & until loops in Ruby
  • Usage of while loop with an example
  • Usage of until loop with an example
  • Usage of redo construct with an example
  • Usage of break with an example

END 8 ------------------------------------

Contributors and Content Editors

NaveenBhat, Sandhya.np14