BASH/C3/Recursive-function/Khasi

From Script | Spoken-Tutorial
Jump to: navigation, search
Time Narration
00:01 Paralok baieid, ngi pdiangsngewbha iaphi sha ka “spoken tutorial” halor ka “Recursive function.”
00:07 Ha kane ka jinghikai, ngin ia pule
00:10 ‘Kaei ka Recursive’ function
00:12 Da ka jingiarap jong ki katto katne ki nuksa.
00:15 Ban bud ia kane ka jinghikai, phi dei ban don ia ka jingtip jong ka “Shell Scripting” ha ka “BASH.”
00:20 Lada phim tip, na ka bynta ki jinghikai kiba iadei, sngewbha leit sha ka website kumba la pyni. http://www.spoken-tutorial.org
00:27 Na ka bynta kane ka jinghikai, nga pyndonkam da ka
00:29 Ubuntu Linux 12.04 Operating System
00:33 Bad ka GNU BASH version 4.2
00:37 Sngewbha kynmaw, “GNU Bash” version 4” lane kaba kham shajrong lah ai jingmut na ka bynta kane ka jinghikai.
00:44 To ngin ia peit kaei ka “recursive function”.
00:48 Ka “recursive function” kadei kata kaba khot hi dalade ialade.
00:52 “Recursion” kadei ka buit kaba iarap ban pynsuk ia ki “algorithm”s kiba eh.
00:59 To ngan plie ia ka file kaba kyrteng ka “factorial.sh”.
01:04 Nga la type ia u “code” ha kane ka file.
01:07 Kane kadei ka “shebang line.”
01:10 factorial() kadei ka kyrteng jong ka function.
01:12 Hapoh jong kane, ngi print ia ka khubor “inside factorial function”.
01:19 Kane ka statement ka pule ia ka “input” jong u nongpyndonkam bad ka buh ia ka “value” ha ka variable ‘n’.
01:26 Hangne, ngi don ia u “if-else’ condition.”
01:30 “If” condition ka check lada ka value jong u ‘n’ ka ia ryngkat bad u zero.
01:36 Lada “True,” kan sa pyni ia ka khubor "factorial value of n is 1".
01:42 Hangne kadei ka “else” ka bynta jong ka “if” statement.
01:46 Ka call ia ka “factorial’ function.”
01:50 Bad ka “fi” kadei kaba kut jong ka “if-else” statement.
01:55 To ngin ia “run” ia ka file “factorial.sh”.
01:59 Plie ia ka “terminal” da ka pyndonkam “CTRL+ALT” bad “T” keys ha kajuh kapor na ka keyboard jong phi.
02:07 Type: chmod space plus x space factorial dot sh
02:15 Nion “Enter.”
02:17 Type: dot slash factorial.sh
02:21 Nion “Enter.”
02:24 Ngi iohi ia ka "Enter the number:" .
02:26 Ngan pyndap 0.
02:29 Ka “output” ka pyni kum:
02:31 "factorial value of 0 is 1".
02:35 Mynta nion ia u “up-arrow key. Kynmaw ia ka “command” kaba hashwa.
02:40 Nion “Enter.”
02:42 Ha kane kapor, ngan pyndap 5.
02:45 Mynta ka “output” ka pyni kum:
02:47 "Inside factorial function".
02:51 To ngin ia pyndap shuh shuh kham bun ka logic ha ka “factorial function.”
02:56 Ngin ia khein ia ka “factorial” jong u number.
03:01 Phai biang sha ka “code” jong ngi.
03:03 Mynta, to ngin ia bujli ia u “echo” statement "Inside the factorial function" da ka “code block”.
03:10 Nion ha “Save”.
03:13 “temp” kadei ka “variable” ban buh ia ka “value” ba lah pyndap da u nongpyndonkam.
03:19 “If” condition ka check lada u varible value u ia ryngkat bad u 1.
03:25 Lada “True”, te kan print “1”.
03:29 Kane kadei ka “else” ka bynta jong ka “if” statement.
03:33 Kane ka pynduna uwei na ka “temp” variable value
03:37 Bad ka buh ia ka result ha u variable ‘f’.
03:42 Variable ‘f’ ka buh ia ka “output” jong u “factorial’ function.”
03:46 Kane kadei ka “recursive call.”
03:50 U value jong u varibale ‘f’ bad “temp” la multiply bad buh ha u ‘f’.
03:57 Nangta ngi “print” ia u value jong u ‘f’.
04:00 Uba dei uba kut jong ka “if-else” statement bad ka “function.”
04:05 Mynta, phai biang sha ki “slides” jong ngi.
04:08 To ngin ia pyrshang ban sngewthuh ia ka jingiaid jong ka program.
04:12 Ka value jong u ‘n’ la shim na u nongpyndonkam kata ‘n’.
04:17 Lada ka value ba la pyndap ka ia ryngkat bad u zero te kan print ia ka khubor
04:24 Lymda kumta kan leit sha ka “function” “factorial”.
04:29 Hangne, lada u value u ‘equal to one’ te kan print ia u value kum ‘one’.
04:36 Lada kam dei kumta, kan sa pynlong ia ka “recursive call” haduh ba u value un da ia ryngkat bad u one.
04:44 Nangta, baroh ki value la multiply bad la pyni.
04:49 Mynta to ngin phai biang sha ka “terminal” jong ngi.
04:52 Nion ia u “up-arrow” key.
04:54 Kynmaw ia ka command kaba hashwa ./factorial.sh
04:58 Nion “Enter.”
05:00 Mynta ngan pyndap “5” kum ka “input value”.
05:05 Ngi ioh ia u “factorial” jong u number 5
05:08 Uba dei “120.”
05:11 Ngi lah ban iohi ia ka jingiaid jong ka program ha ka “terminal”. Khmih bad peit thuh ia ka jingiaid jong ka program.
05:18 Phai biang sha ki “slides”.
05:20 To ngin ia batai kyllum. Ha kane ka jinghikai, ngi la pule ia ka
05:23 Recursive function
05:25 Da ka jingiarap jong katto katne ki nuksa.
05:28 Kum ka kam na ka bynta jong phi, thoh ia ka program ha kaba ka “recursive function” ka khein ia ka sum jong ‘N’ numbers.
05:36 Peit ia ka video kaba don ha ka link ba la pyni harum.
05:39 Ka kyllum lang ia ka Spoken-Tutorial project.
05:43 Lada phim don ia ka bandwidth kaba biang, phi lah ban shu download bad peit ia ka hadien.
05:47 Ka kynhun jong ka Spoken Tutorial Project: *Ka pynlong ia ki workshops da kaba pyndonkam da ki spoken tutorials;
05:53 Ka ai certificate sha kito kiba pass ha ka online test.
05:58 Na ka bynta ki jingtip ba kham bniah, sngewbha thoh sha ka contact@spoken-tutorial.org
06:06 Spoken Tutorial project kadei shi bynta jong ka Talk to a Teacher project.
06:10 La kyrshan ia ka da ka National Mission on Education lyngba ka ICT, MHRD, Sorkar India.
06:18 Kham bun ki jingtip halor ka mission kidon ha ka link ba la ai harum. http://spoken-tutorial.org\NMEICT-Intro
06:24 Ia kane ka script la noh synniang da ka FOSSEE bad ka kynhun jong ka Spoken-Tutorial.
06:29 Ma nga i Meboreen na Shillong, nga pynkut ia kane.
06:33 Khublei shibun.

Contributors and Content Editors

Meboreen Mary