PERL/C2/More-Conditional-statements/Khasi

From Script | Spoken-Tutorial
Jump to: navigation, search
Time Narration
00:00 Khublei ngi pdiangsngewbha iaphi sha ka spoken tutorial halor ka if-elsif-else bad switch conditional statements ha ka PERL.
00:07 Ha kane ka jinghikai, ngin ia pule shaphang
00:10 ka if-elsif-else statement bad ka switch statement ha ka Perl .
00:15 Nga pyndonkam da ka “Ubuntu Linux 12.0” operating system bad ka Perl 5.14.2.
00:22 Ngan sa pyndonkam ruh ia ka gedit Text Editor.
00:25 Phi lah ban pyndonkam da kano kano ka text editor katkum ka jingkwah jong phi.
00:29 Phi dei ban don ia ki jingtip shaphang ki variables jong ki comments ha ka Perl
00:34 Bad ki jingtip shaphang ka for, foreach, while bad do-while loops bad
00:38 if bad if-else statements kan long ka jingmyntoi ka ba bha shibun.
00:43 Sngewbha leit sha ka jinghikai ba iadei bad ka spoken tutorials ha ka Spoken Tutorial website.
00:48 If-elsif-else statement ha ka Perl lah ban pyndonkam
00:52 Ban test ia ki multiple conditions bad
00:54 Ynda baroh ki conditions kim treikam te ka executes ia ka default else block.
00:59 Ka syntax jong ka if-elsif-else statement kadei kumne harum.
01:04 if space open bracket condition1 close bracket space open curly bracket shon Enter
01:13 U code u ban sa shah execute ynda ka condition kadei true semicolon
01:18 shon Enter .
01:20 Close curly bracket space elsif space open bracket condition2 close bracket space open curly bracket
01:30 Shon Enter , uwei pat u code semicolon
01:33 U ban sa shah execute ynda ka elsif condition kadei true
01:37 shon Enter .
01:39 Close curly bracket space else space open curly bracket
01:44 Enter. U code u ban sha shah execute ynda baroh ar tylli ki condition kidei false semicolon
01:51 shon Enter . Close curly bracket.
01:55 Nyngkong, u if condition u checked bad execute lada ka condition1 kadei true.
02:01 Lada em, te ka else if condition ka checked bad execute lada kadei true.
02:06 Lymda kumta, u code hapoh u else block un sa shah executed.
02:11 Mynta to ngin ia peit ia ka nuksa jong ka if-elsif-else statement.
02:16 Plie ia ka Terminal bad type:
02:19 gedit conditionalBlocks dot pl space ampersand
02:26 bad shon Enter.
02:28 Kane kan sa plie ia ka " conditionalBlocks.pl" file ha ka gedit.
02:33 Type ia u code kumba la pyni ha ka screen.
02:38 Ngi lah assign ia u value jong ka 'Perl' sha ka variable language.
02:44 Kynmaw ba ka eq kadei string comparison operator.
02:49 Bad nangta ngi don bun tylli ki conditions kiba ngi kwah ban check.
02:55 Mynta, shon Ctrl+s bad save ia ka file.
02:58 Nangta phai sha ka terminal bad execute noh hi syndon ia ka file.
03:02 Type: perl conditionalBlocks dot pl
03:09 Kynmaw: Nga lah jam ia ka compilation step. Kam dei ka step kaba donkam than na ka bynta ban execute ia ki Perl scripts.
03:16 Lada kadon kano kano ka compilation error,
03:18 Ka execution kan sa ai ia ka error bad kan sa sangeh ban execute ia ka script.
03:23 Mynta shon Enter.
03:25 Ka output kaba pyni ha ka terminal kadei
03:27 "Hi, I am Perl"
03:29 Mynta, to ngin ia peit sa ia kawei pat ka kam.
03:31 Phai sha ka gedit.
03:33 Assign 'Java' sha u variable language kumba la pyni.
03:37 Shon Ctrl+s ban save ia ka file.
03:40 Phai sha ka terminal bad execute ia ka file.
03:43 Type: perl conditionalBlocks dot pl
03:50 bad shon Enter.
03:53 Ka output kaba la pyni ha ka terminal kadei "Hi, I am Java".
03:59 Sa shisien to ngin ia phai biang sha ka gedit.
04:03 Mynta, to ngin ia assign ia ka 'English' sha ka language variable.
04:07 Shon ctrl+s ban save ia ka file.
04:09 Phai sha ka terminal bad execute ia ka file.
04:13 Type: perl conditionalBlocks dot pl
04:18 Bad shon Enter. Ka output kaba la pyni ha ka terminal kadei:
04:22 "I am not a computer language".
04:27 Ki lai tylli ki bynta ki batai ba
04:29 Tang uwei u if block uba pynbiang paka ia ka condition un sa shah execute.
04:35 Lymda kumta ka else block kaba long hi kan sa shah execute.
04:39 Ngi lah ban don bun tylli ki elsif conditions katkum ka jingdonkam jong ngi, kum kane.
04:46 Hangne ka kam na ka bynta jong phi -
04:48 Thoh ia ka if-elsif-else statement ban print
04:51 “I am a Science graduate” lada ka stream kadei 'science'
04:55 “I am a Commerce graduate” lada ka stream kadei 'commerce'
04:59 “I am an Arts graduate” lada ka stream kam dei 'science' lane 'commerce'.
05:06 Mynta to ngin ia pule shaphang ka switch statement.
05:10 Haduh ka Perl 5.8, kam don ka switch statement ha ka Perl.
05:14 Hadien kata, ia ka Switch module lah introduce
05:18 Kaba ai ia ka jingtreikam jong ka switch statement.
05:22 Kynmaw: Modules ha ka Perl ngin sa ia peit ha ki jinghikai kiba bud.
05:27 Ka syntax jong ka switch kadei kumne harum:
05:30 Pyndonkam ia u Switch semicolon
05:32 shon Enter
05:34 switch space open bracket $ (dollar) value close bracket space open curly bracket
05:42 shonEnter
05:44 case space 1 space open curly bracket executes when dollar value equal to 1 close curly bracket.
05:53 Shon Enter.
05:55 case space single quote a single quote space open curly bracket executes when dollar value equal to single quote a single quote close curly bracket
06:09 Shon Enter . else space open curly bracket executes when dollar value does not match any of the cases
06:18 close curly bracket. Shon Enter .
06:20 Close curly bracket.
06:22 To ngin ia pyrshang ban sngewthuh ia ka switch da kaba pyndonkam da ka sample program.
06:26 Plie ia ka Terminal and type:
06:29 gedit sampleSwitch dot pl space ampersand
06:36 bad shon Enter.
06:38 Mynta, type ia ka sample program kumba la pyni ha ka screen.
06:43 To ngin ia pyrshang ban sngewthuh kumno ka switch statement ka treikam.
06:46 Ka use Switch statement ka kynthup ia ka Switch module hapoh ka Perl code.
06:54 Kynmaw: Ngin sa ia pule shaphang ka use keyword, ha ka rukom ba bniah, ha ka jinghikai kaba bud.
07:00 Mynta ngin ia test ki jingjia bapher bapher.
07:03 Ngi lah assign ia ka 'Perl' sha ka variable $var.
07:08 U value jong ka variable $var u check ha ka switch statement.
07:14 Ha ka case ba nyngkong, ka iadei bad ka case 'Perl'.
07:19 Te, u code ba la thoh mar pyrshah ia ka case kan sa shah execute.
07:24 Shon ctrl+s ban save ia ka file.
07:27 Mynta, phai sha ka terminal bad execute ia ka script
07:31 perl sampleSwitch.pl
07:36 shon Enter.
07:38 Ka output harum la pyni ha ka terminal
07:41 "I am Perl"
07:43 Phai biang sha ka sampleSwitch.pl ha ka gedit.
07:48 Mynta, to ngin ia assign 'Linux' sha ka variable $var.
07:52 Shon Ctrl+S ban save ia ka file.
07:57 Sa shisien, u value jong u variable $var un sa shah check ha ka switch.
08:03 Ka iadei bad ka case 'Linux'.
08:05 Te, ka code ba la thoh mar pyrshah bad ka case kan sa shah execute.
08:10 Mynta, phai sha ka terminal bad execute ia ka script.
08:15 perl sampleSwitch.pl
08:19 shon Enter.
08:21 Ka output harum la pyni ha ka terminal.
08:24 "I am Linux"
08:26 phai sha ka sampleSwitch.pl ha ka gedit.
08:30 Ha kajuh ka rukom, lada u variable $var u don ia u value 'Java' te ka case kaba ar kan sa shah check.
08:38 Mynta, to ngin ia assign 'English' sha ka variable $var.
08:42 Sa shisien, u value jong ka variable $var un sa shah check ha ka switch.
08:47 Kam iadei bad kino kino ki case statements.
08:50 Te, ka else statement kan sa shah execute.
08:54 Mynta, phai sha ka terminal bad execute ia ka script.
09:00 perl sampleSwitch.pl
09:07 bad shon Enter.
09:09 Ka output harum la pyni ha ka terminal:
09:12 "I am not a computer language"
09:17 Ki lai tylli ki bynta ki batai ba:
09:20 Ka value jong ka expression ka rai ia ka case ka ban shah execute.
09:25 Tang ka case kaba long valid kan sa shah execute bad
09:28 Ynda ym don ka case kaba long valid te ka else case kaba long hi kan sa shah execute.
09:35 Kam dei kaba donkam than ban thoh ia ka else case.
09:39 Ha kum kine ki khep,
09:41 Lada ym don kino kino ki cases kiba iadei
09:44 Te kan nym don kano kano ka output na ka switch statement.
09:48 Hangne ka kam na ka bynta jong phi:
09:50 Thoh biang sa shisien ia ka assignment ba hakhmat
09:53 Kaba lah ai hashwa, ha kane ka jinghikai, da kaba pyndonkam ia ka switch statement.
09:57 To ngin ia batai kyllum.
09:59 Ha kane ka jinghikai, ngi lah pule shaphang ka:
10:01 if-elsif-else statement bad
10:04 Ka switch statement ha ka Perl da kaba pyndonkam da ka sample program.
10:08 Peit ia ka video kaba don ha ka link harum.
10:12 Ka kyllum lang ia ka Spoken Tutorial project.
10:15 Lada phim don ia ka bandwidth kaba biang, phi lah ban shu download bad peit ia ka hadien.
10:20 Ka kynhun jong ka Spoken Tutorial project: Ka pynlong ia ki workshop da kaba pyndonkam ia ki spoken Tutorials.
10:25 Ka ai certificates sha kito kiba pass ha ka online test.
10:30 Na ka bynta ki jingtip ba bniah, sngewbha thoh sha ka: contact at spoken hyphen tutorial dot org.
10:36 "Spoken Tutorial" project kadei shi bynta jong ka "Talk to a Teacher" project.
10:40 La kyrshan ia ka da ka National Mission on Education lyngba ka ICT, MHRD, Sorkar India.
10:47 Kham bun ki jingtip halor kane ka mission kidon ha ka: spoken hyphen tutorial dot org slash NMEICT hyphen Intro.
10:58 Kyrmen phi sngewtynnad ia kane ka jinghikai halor ka PERL
11:00 Ma nga U Pdiangburom na Shillong, nga pynkut ia kane.
11:03 Khublei shibun.

Contributors and Content Editors

Pdiangburom