D A Y H I D E E f t U L E N H T R O N G C H U O N G T R I N H T I N H O C L O P 1 1 O TS TRINH THANH HAr Trong day hgc (DH) mon Tin hoc 6 trung hoc pho'''' thong (THPT), cdc tinh hudng DH nhu DH khdi nie[.]
D A Y T R O N G -HIDE C H U O N G E f t U T R I N H L E N H T I N H O C O L O P 1 TS TRINH THANH HAr Trong day hgc (DH) mon Tin hoc trung lenh Trong budc nay, GV can gidi thich rd tung hoc pho' thong (THPT), cdc tinh hudng DH nhu: thdnh phdn, hogt ddng vd nhung chu y su DH khdi niem, DH cdu lenh, DH quy trinh thao dyng (neu cd) cdu lenh mdt each tryc quan GV tdc, DH lap trinh gidi todn, cd the coi Id nhung cung cd the lay cdc vi dy cy the de hoc sinh (HS) tinh hudng dien hinh Mat khdc, vi mdn Tin hoc nhdn dang, ndm vung cu phap cua cdu lenh; mdi duqc dua vdo gidng dgy dgi trd d THPT, 3) Nhan dgng cau lenh Trudc het, HS cdn nhdn nen nhieu gido vien (GV) cdn gap khd khan dang duqc mdt ddng vdn bdn dd the hien chinh viec van dyng li ludn vd phuang phap xdc cu phap cua cdu lenh mdi hay chua? Tiep day hoc (PPDH) vdo tung ndi dung cy the Nhu theo, HS phdi nhdn dgng duqc tinh hudng dn vdy, neu GV xdc djnh duqc PPDH phu hqp vdi khdp vdi cdu lenh; 4)The hien mdt cdu lenh: day moi tinh hudng dien hinh DH cdu lenh d Id budc md HS van dyng cdu lenh vdo gidi quyet Idp 11, se gdp phdn ndng cao chdt luqng DH cdc nhiem vy cy the Tuy nhien, ddi vdi mdt sd tin hoc d THPT cdu lenh, cd the tich hqp hodc to chuc cdc budc Phuong phap chung DH cdu lenh dan xen vdi Van dyng sdng tqo quan diem hoqt ddng V i dy minh hoa DH vdo DH cdu lenh (cua ngdn ngu lap trinh Cdc buac DH phdn cdu lenh if-then bdi Pascal) chuang trinh SGK Tin hoc 11, GV «Cdu true re nhanh" (SGK Tin hoc 11) cd the trien ,, i •I i , I I tep can cau lenh khai theo cac Hoat dong cua GV Hoat ddng cua HS budc sau: I) Qua tieu muc 1), ta da tim hieu cac cau true - HS chua biet cau lenh nao de mo ta cau Tiep can cau re nhanh thieu va du true re nhanh thieu va du (hinh dong cd lenh Cd nhieu W\ Trong Pascal diing cau lenh nao dl diin mu6n tim hieu cau lenh diing de mo ta cau each de tiep ta cau true re nhanh thieu va du? true re nhanh) can cdu lenh, 2) Gidi thieu cu phap, hoat ddng cau lenh each thudng su Hoat dong cua GV Hoat dong cua HS dyng Id xud't Pascal co hai dang cau lenh If-then: HS can nhan dang duac: phdt tu kien - Cau lenh dang thilu de mo ta cau true re thuc tin hoc Dang thieu: If Then ; nhanh thieu va duoc dien ta bdi hinh trong chuang Dang du: If Then Else ; (1, tr 39) trinh SGK hodc tu nhung Trong do: - If, then, else: la cac tir khoa; - Cau lenh dang du de md ta cau true van de cua thyc - Dieu kien la bi§u thirc logic; - Cau lenh 1, re nhanh dd va duoc dien ta hinh cau lenh la mot cau lenh cua Pascal (1, tr 39) tiln GV dua - Dang thieu Dieu kien se duoc tinh va kiem mdt thudt |?J Can cir vao hinh va hinh SGK, todn, cdu true hay cho biet hoat dong cua cau lenh If-then tra N§u dieu kien diing (co gia tri true), cau lenh se duac thyc hien, ngupc lai thi cau lenh hodc mdt dang thieu va dang du se bi bo qua nhiem vy dan - Dang dir Di§u kien se duoc tinh va kiem tra tdi cdn cd cdu Neu dilu kien diing thi cau lenh dupe thuc lenh mdi de hien, ngupc lai thi cau lenh dupe thuc hien gidi quyet van de; 2) Giai thieu cu phap, hogt dong cua cau * Tnrong Dai hoc sir pham - Dai hoc Thai Nguyen T ( Tap chi Giao due so 263 (k i 6/2011) 3) Nhan dang cau linh If-then Hoat ddng cua GV Hoat ddng cua HS [?J Hay xem cac vi du 1, (1; tr.40) chi ro HS tra lot dupe cac cau cua GV: Dang thieu: vi du 1; • Dangdu: viduZ dau la cau lenh If-then dang thieu, du a) Sai bieu thue dieu kien Xac djnh ro trudng hop nao dung, trurjng hpp b) Sai cau lenh gan a:=a/3 nao chua dung (tai sao) cac trudng hpp sau (GV dung may chieu hoac bang phu), vol a la c) Dung d) Sai vi trudc else cd dau bien kieu nguyen: e)Dung a) If a := then writeln(a); b)lfa>3thena:=a/3; c) lfa 10 then a := a + 2; else a.-a-2; e) If a then writeln(1/a) else writeln (a +1); 4) The Nen cau lenh Hoat dgng cua GV Xet cau lenh sau: Cau lenh 1: max:=a; if b > a then max:= b; Cau lenh 2: if b > a then max:= b else max:=a; Hay thuc hien hai cau lenh tren vdi hai cap gia tri: - a = va b = 5; - a = va b = va dien kit qua vao bang: Cau lenh a b Bieu kien Gia tri bien max b>a Cau lenh a b Dieu kien Gia tri bien max b>a 7j Qua cac vi du tren, hay cho biet dua vao can cCr nao d l sit dung cau lenh if-then dang thieu, dang du cho dung |?J Hay xac djnh cau lenh re nhanh de giai bai tap strong (1, tr 51) Hoat ddng cua HS Vdf cau linh 1: - Trudng hop a=3, b=5 Boot 1: Bien max nhan gia tri bang Budc2: Vi bieu thuc diiu kien 5>3dung (tra vi gia tri True) nen lenh max:=b duqc thuc hien Bien max nhan gia tri bang 5; - Trudng hqp a = 7vab = 4: Budc 1: bien max nhan gia tri bang Budc 2: Vi bieu thuc dieu kien > sai nen cau lenh sau tir khoa then max:=b khdng duqc thuc hien Biin max vln giu" nguyen gia tri Vdi cau linh 2: - Trudng hqp a = va b = 5: Vi bieu thuc dieu kien >3 diing nen cau lenh sau then max:=b duqc thuc hien Bien max nhan gia tri bang 5; - Trudng hop vdi a = va b = 4: Vi bieu thirc diiu kien >7 sai nen cau lenh (max:=a) sau tu khoa elsse dude thuc hien Bien max nhan gia trj Phai can cir vao cac menh de dupe md ta thuat toan b dang thieu (Niu thi ) hay dang du (Niu thi, niu khdng thi ) de xac djnh cau lenh if-then tuong ung - Cau a) cd the diing cau lenh re nhanh dang thieu - Cau b) cd thi sir dung cau lenh re nhanh dang thieu hoac cau lenh re nhanh dang du Nqi dung mdn Tin hgc trudng phd thdng cd lien he mdt thiet vdi nhieu hoat ddng nhu: hogt dgng nhgn dgng vd the' hien, hogt dgng tin hgc phuc hgp, hogt ddng tri tui phd biin tin hgc, hogt ddng tri tue chung vd hogt ddng ngdn ngu Trong DH tin hoc ndi chung, DH cdu lenh d Idp 11 ndi rieng, GV cdn thiet ke cdc tinh hudng cd dyng y su phgm, tqo mdt mdi trudng thudn Iqi de HS tiep can vd chiem hnh tri thuc, hinh thdnh vd ren luyen kT ndng thdng qua viec tham gia cdc hoqt ddng ke tren Day Id mot nhung bien phap khd thi nhdm tich cue hda hogt ddng hoc tap cua HS vd ndng cao hieu gud DH • (1) H6 SI Dam (chu bien) Tin hoc 11 NXB Gido due, H 2007 Tai lieu tham khao Nguyen Ba Kim - Le Khac Thanh Phuong phap day hoc Tin hoc (phan phuong phap day hoc dai cuang) NXB Dgi hoc suphgm, H 2006 Trinh Thanh Hai Phuong phap day hoc tin hoc (phan phuong phap giang day cu the) NXB Gido due H.2010 Tap c h i Giao due so (k i 6/201 n ... tin hgc, hogt ddng tri tue chung vd hogt ddng ngdn ngu Trong DH tin hoc ndi chung, DH cdu lenh d Idp 11 ndi rieng, GV cdn thiet ke cdc tinh hudng cd dyng y su phgm, tqo mdt mdi trudng thudn Iqi... du Nqi dung mdn Tin hgc trudng phd thdng cd lien he mdt thiet vdi nhieu hoat ddng nhu: hogt dgng nhgn dgng vd the'' hien, hogt dgng tin hgc phuc hgp, hogt ddng tri tui phd biin tin hgc, hogt ddng... ndng cao hieu gud DH • (1) H6 SI Dam (chu bien) Tin hoc 11 NXB Gido due, H 2007 Tai lieu tham khao Nguyen Ba Kim - Le Khac Thanh Phuong phap day hoc Tin hoc (phan phuong phap day hoc dai cuang)