《算法与程序设计》VB教案.docx
《《算法与程序设计》VB教案.docx》由会员分享,可在线阅读,更多相关《《算法与程序设计》VB教案.docx(11页珍藏版)》请在冰点文库上搜索。
《算法与程序设计》VB教案
《算法与程序设计》VB教案
第一章计算机解决问题的过程一、教学目标
1.知识与技能
(1)让学生了解算法、穷举法、程序设计语言、编写程序和调试程序
等概念。
(2)让学生知道对现实问题的自然语言的描述,特别是类似程序设计
语言的自然语言描述。
(3)让学生理解分析问题、设计算法、编写程序、调试程序这一用计
算机解决问题的基本步骤,认识其在算法与程序设计中的作用。
2.方法与过程
(1)培养学生发现旧知识的规律、方法和步骤,并把它运用到新知识
中去的能力。
(2)培养学生调试程序的能力。
(3)培养学生合作、讨论、观摩、交流和自主学习的能力。
3.情感态度和价值观
通过“韩信点兵”这个富有生动情节的实例和探究、讲授、观摩、
交流等环节,让学生体验用计算机解决问题的基本过程。
二、重点难点
本节的重点用计算解决问题的过程中的分析问题、设计算法、和上机调试程序等步骤。
用计算机解决问题的过程中的分析问题、设计算法也是本节的难点。
三、教学环境
1.教材处理
theunitofevaluationscoring,intotheperformanceevaluation,performanceevaluationandtheworkofcivilization,asthefirsttree,useofcadresoftheimportantreference.Sixth,weshouldstrengthentheprotectionofstyle.Departmentsatalllevelsshouldfirmlyestablishthe"manofactionistheability,implementationisthelevel"concept,developtheabilitytoendurehardship,notafraidofdifficulties,fighttoughstyle,sothefaceofresponsibilityplaynoprevarication,taskexecutiondoesnotflinch,difficultiesisnottoavoid.Tothecomprehensiverectificationactionastestandtempercadresandunderstanding,execution,innovation"touchstone",andfurtherestablisha"developmentofheroes,byperformancewithcadresofguidance.Developmentisofgreatsignificancetocreateanationalcivilizedcitycomprehensiverectificationaction,gloriousmission.MunicipalPartycommitteeandmunicipalgovernmentcalledon,thecitytoactquickly,vigorousandresolutestyleofwork,andresolutelyfighttowinthebattleofassaultfortifiedpositions,tothepeopleofthecitytosurrenderaqualifiedanswerroll!
ThemeetingisheldbytheBureauofthePartycommitteeofconsent.ThemaincontentsofthemeetingisimplementthePUCvolunteerssafeconstructionworktopromotethespirit
教学内容选用中华人民共和国教育部制订的《普通高中技术课程标准》(2003年4月版)中信息技术部分的选修模块1“算法与程序设计”第一章的第一课“计算机解决问题的过程”。
教材选用《广东省普通高中信息技术选修一:
算法与程序设计》第三章第一节,建议“算法与程序设计”模块在高中一年级下学期或高中二年级开设。
根据2003年4月版《普通高中技术课程标准》的阐述,“算法与程序设计”是普通高中信息技术的选修模块之1,它的前导课程是信息技术的必修模块“信息技术基础”。
学生在“信息技术基础”模块里已经学习了计算机的基本操作,掌握了启动程序、窗口操作和文字编辑等基础知识。
学生可以利用上述的基础知识,用于本节课的启动VisualBasic程序设计环境,输入程序代码,运行程序等操作。
本节课“计算机解决问题的过程”是“算法与程序设计”模块的第一节课,上好这节课是使学生能否学好“算法与程序设计”这一模块的关键。
本节课的教学目的是让学生理解分析问题、设计算法、编写程序和调试程序等用计算机解决问题的基本过程,认识其在算法与程序设计中的地位和作用,它也是后续课程如模块化程序设计、各种算法设计等课程的基础。
让学生在人工解题中发现分析问题、设计算法等步骤,并把它应用到用计算机解决问题中去,这是构建主义中知识迁移的方法。
本节课还采用了探究、讲授、观摩、交流、阅读材料等多种教学活动的有机结合的方法。
2.预备知识
本节课相联系的旧知识是计算机的基本操作中鼠标、键盘操作,启动、关闭程序,窗口、菜单操作和文字编辑等基础知识,还有解决数学问题的步骤等知识。
theunitofevaluationscoring,intotheperformanceevaluation,performanceevaluationandtheworkofcivilization,asthefirsttree,useofcadresoftheimportantreference.Sixth,weshouldstrengthentheprotectionofstyle.Departmentsatalllevelsshouldfirmlyestablishthe"manofactionistheability,implementationisthelevel"concept,developtheabilitytoendurehardship,notafraidofdifficulties,fighttoughstyle,sothefaceofresponsibilityplaynoprevarication,taskexecutiondoesnotflinch,difficultiesisnottoavoid.Tothecomprehensiverectificationactionastestandtempercadresandunderstanding,execution,innovation"touchstone",andfurtherestablisha"developmentofheroes,byperformancewithcadresofguidance.Developmentisofgreatsignificancetocreateanationalcivilizedcitycomprehensiverectificationaction,gloriousmission.MunicipalPartycommitteeandmunicipalgovernmentcalledon,thecitytoactquickly,vigorousandresolutestyleofwork,andresolutelyfighttowinthebattleofassaultfortifiedpositions,tothepeopleofthecitytosurrenderaqualifiedanswerroll!
ThemeetingisheldbytheBureauofthePartycommitteeofconsent.ThemaincontentsofthemeetingisimplementthePUCvolunteerssafeconstructionworktopromotethespirit
3.硬件要求
可以进行屏幕广播的多媒体电脑室。
教师自行设计制作的课件。
准备《计算机解决问题的过程》教学活动表。
4.所需软件
学生机要安装VB6.0或以上版本。
5.所需课时
1课时(40分钟)
四、教学过程
(一)引入
教师:
“在科技发达的今天,我们到处都可以看到计算机的踪影,感受到计算机给学习、生活带来的方便。
然而,在惊叹计算机的神奇和享受的欢乐的时候,你是否了解计算解决问题的基本过程,有没有思考过其中的奥妙呢,下面我们先看一个古典的问题:
”
学生观看约1分钟的电视剧《汉刘邦》片断,内容大致如下:
“韩信是我国西汉初著名的军事家,刘邦得天下,军事上全依靠他。
韩信点兵,多多益善,不仅如此,还能经常以少胜多,以弱胜强。
在与楚军决战时韩信指挥诸侯联军,在垓下十面埋伏,击败楚军,楚霸王项羽因此自杀。
”
片断结束时屏幕出现“韩信点兵”问题:
“相传汉高祖刘邦问大将军韩信统御兵士多少,韩信答说,每3人一列余1人、5人一列余2人、7人一列余4人、13人一列余6人„„。
刘邦茫然而不知其数。
你呢,”
(二)问题
教师:
“下面我们先助刘邦解决一个简单的问题。
”
展示题目:
theunitofevaluationscoring,intotheperformanceevaluation,performanceevaluationandtheworkofcivilization,asthefirsttree,useofcadresoftheimportantreference.Sixth,weshouldstrengthentheprotectionofstyle.Departmentsatalllevelsshouldfirmlyestablishthe"manofactionistheability,implementationisthelevel"concept,developtheabilitytoendurehardship,notafraidofdifficulties,fighttoughstyle,sothefaceofresponsibilityplaynoprevarication,taskexecutiondoesnotflinch,difficultiesisnottoavoid.Tothecomprehensiverectificationactionastestandtempercadresandunderstanding,execution,innovation"touchstone",andfurtherestablisha"developmentofheroes,byperformancewithcadresofguidance.Developmentisofgreatsignificancetocreateanationalcivilizedcitycomprehensiverectificationaction,gloriousmission.MunicipalPartycommitteeandmunicipalgovernmentcalledon,thecitytoactquickly,vigorousandresolutestyleofwork,andresolutelyfighttowinthebattleofassaultfortifiedpositions,tothepeopleofthecitytosurrenderaqualifiedanswerroll!
ThemeetingisheldbytheBureauofthePartycommitteeofconsent.ThemaincontentsofthemeetingisimplementthePUCvolunteerssafeconstructionworktopromotethespirit
“韩信点兵”问题1:
求整除3余1、整除5余2、整除7余4的最小自然数。
(三)探究
把全班分成16个学习小组,每个小组的同学一起探究、讨论问题。
利用已学过的数学知识找出题目已知什么求什么、明确已知和未知之间的关系和写出求解问题的解题步骤。
并填写《计算机解决问题的过程》教学活动表中的“探究问题记录表”。
如下:
探究问题记录表
分析问题(找出已知和未
结
知、列出已知和未知之间写出解题步骤
果
的关系)
给5分钟学生讨论,教师在这过程中到各学习小组中,引导个别学习小组分析问题、写出解题步骤。
教师提问2~3个同学,从中逐渐引导出类似如下的分析问题和解题步骤,并给出算法的概念。
分析问题(找出已知和未
知、列出已知和未知之间写出解题步骤
的关系)
设所求的数为X,则1、令X为1。
X应满足:
2、如果X整除3余1,X整除5余
X整除3余12,
X整除5余2X整除7余4,这就是题目
X整除7余4要求的数,则记下这个X。
theunitofevaluationscoring,intotheperformanceevaluation,performanceevaluationandtheworkofcivilization,asthefirsttree,useofcadresoftheimportantreference.Sixth,weshouldstrengthentheprotectionofstyle.Departmentsatalllevelsshouldfirmlyestablishthe"manofactionistheability,implementationisthelevel"concept,developtheabilitytoendurehardship,notafraidofdifficulties,fighttoughstyle,sothefaceofresponsibilityplaynoprevarication,taskexecutiondoesnotflinch,difficultiesisnottoavoid.Tothecomprehensiverectificationactionastestandtempercadresandunderstanding,execution,innovation"touchstone",andfurtherestablisha"developmentofheroes,byperformancewithcadresofguidance.Developmentisofgreatsignificancetocreateanationalcivilizedcitycomprehensiverectificationaction,gloriousmission.MunicipalPartycommitteeandmunicipalgovernmentcalledon,thecitytoactquickly,vigorousandresolutestyleofwork,andresolutelyfighttowinthebattleofassaultfortifiedpositions,tothepeopleofthecitytosurrenderaqualifiedanswerroll!
ThemeetingisheldbytheBureauofthePartycommitteeofconsent.ThemaincontentsofthemeetingisimplementthePUCvolunteerssafeconstructionworktopromotethespirit
3、令X为X+1(为算下一个作准备)。
4、如果算出,则结束;否则跳转2。
5、写出答案。
教师解释第3步“另X为X+1”并指出它与数学中的区别,并从上面的解题步骤中总结出穷举的算法。
教师:
“刚才有些同学把题目解出来了,答案是67,韩信作为大将军,统率士兵当然不止67人,下面我们来解决一个数据量稍大的问题。
”
展示题目:
“韩信点兵”问题2:
求整除3余1、整除5余2、整除7余4、整除13余6、整除17余8的最小自然数。
给2分钟学生分析上述问题并写出算法,不用计算。
学生有了第1题的经验,很快会写出和第一题类似的算法。
如下:
分析问题(找出已知和未
知、列出已知和未知之间写出解题步骤
的关系)
1、令X为1。
设所求的数为X,则
2、如果X整除3余1,
X应满足:
X整除5余2,
X整除3余1
X整除7余4,
X整除5余2
X整除13余6,
X整除7余4
X整除17余8,则记下这个X。
X整除13余6
3、令X为X+1。
X整除17余8
4、如果算出,则结束;否则跳转2。
theunitofevaluationscoring,intotheperformanceevaluation,performanceevaluationandtheworkofcivilization,asthefirsttree,useofcadresoftheimportantreference.Sixth,weshouldstrengthentheprotectionofstyle.Departmentsatalllevelsshouldfirmlyestablishthe"manofactionistheability,implementationisthelevel"concept,developtheabilitytoendurehardship,notafraidofdifficulties,fighttoughstyle,sothefaceofresponsibilityplaynoprevarication,taskexecutiondoesnotflinch,difficultiesisnottoavoid.Tothecomprehensiverectificationactionastestandtempercadresandunderstanding,execution,innovation"touchstone",andfurtherestablisha"developmentofheroes,byperformancewithcadresofguidance.Developmentisofgreatsignificancetocreateanationalcivilizedcitycomprehensiverectificationaction,gloriousmission.MunicipalPartycommitteeandmunicipalgovernmentcalledon,thecitytoactquickly,vigorousandresolutestyleofwork,andresolutelyfighttowinthebattleofassaultfortifiedpositions,tothepeopleofthecitytosurrenderaqualifiedanswerroll!
ThemeetingisheldbytheBureauofthePartycommitteeofconsent.ThemaincontentsofthemeetingisimplementthePUCvolunteerssafeconstructionworktopromotethespirit
5、写出答案。
教师:
“上面的结果超过1万,人工计算要很长时间,在科技发达的今天,你想到什么,”(用计算机解题)
(四)用计算机解决问题
教师:
“计算机怎么样解决问题,用计算机解决问题,同样要经过分析问题、设计算法两步骤。
”在讲授过程中展示人工解题中分析问题和设计算法这两个步骤。
教师:
“用计算机解题,是不是输入上面的算法,上面用自然语言描述的算法,计算机不懂,必须翻译成计算机的语言,这就是程序设计语言。
”教师展示与用VisualBasic语言编写的程序作对照。
简单解释变Y的作用,并提示学生程序设计语言是我们以后学习的重点。
本例用VisualBasic语言编写的程序请看教材如下:
PrivateSubCommand1_Click()
DimXAsInteger,YAsInteger
X=1:
Y=0
Do
IfXMod3=1Then
IfXMod5=2Then
IfXMod7=4Then
IfXMod13=6Then
IfXMod17=8ThenY=X
EndIf
EndIf
theunitofevaluationscoring,intotheperformanceevaluation,performanceevaluationandtheworkofcivilization,asthefirsttree,useofcadresoftheimportantreference.Sixth,wesh