(全国通用版)2018_2019高中数学第一章算法初步1.2.2条件语句练习新人教B版必修3.doc

上传人:deputyduring120 文档编号:1192425 上传时间:2019-05-16 格式:DOC 页数:5 大小:156.50KB
下载 相关 举报
(全国通用版)2018_2019高中数学第一章算法初步1.2.2条件语句练习新人教B版必修3.doc_第1页
第1页 / 共5页
(全国通用版)2018_2019高中数学第一章算法初步1.2.2条件语句练习新人教B版必修3.doc_第2页
第2页 / 共5页
(全国通用版)2018_2019高中数学第一章算法初步1.2.2条件语句练习新人教B版必修3.doc_第3页
第3页 / 共5页
(全国通用版)2018_2019高中数学第一章算法初步1.2.2条件语句练习新人教B版必修3.doc_第4页
第4页 / 共5页
(全国通用版)2018_2019高中数学第一章算法初步1.2.2条件语句练习新人教B版必修3.doc_第5页
第5页 / 共5页
亲,该文档总共5页,全部预览完了,如果喜欢就下载吧!
资源描述

1、11.2.2 条件语句课时过关能力提升1 给出以下三个问题:求面积为 6 的正方形的周长;求三个数 a,b,c 中的最大数;求函数 f(x)=-1,0,+2,0y=-2;elseif x=0y=0;elsey=2;endendprint(%io(2),y);A.-2 B.1 C. D.2解析 因为 0,所以 y=-2,故运算结果为 -2.答案 A5 下面是一个算法的程序 .如果输出的 y 的值是 20,那么输入的 x 的值是( )x=input(“x=”);if x5 时,由 2. 5x+5=20,解得 x=6.综上,输入的 x 的值是 2 或 6.答案 C6 根据下面的程序,当输入的 a,b

2、 分别为 2,3 时,最后输出的 m 的值为 . a=input(“a=”);b=input(“b=”);if abm=a;elsem=b;endprint(%io(2),m);解析 因为 a=2,b=3,且 a0的 值 的算法 语 句如下 :来源:学科网ZXXKx=input(“x=”);if x=0y=0.2;elseif y=1+2 x;elsey=1-2 x;endendprint(%io(2),y);则空白处应填写( )A.x=0 D.x0解析 由函数解析式可知当 x0 时, y=1+2x,故应填 x0.答案 D8 读程序 、 ,若两程序输入值与执行结果均分别相同,则两程序的输入值为

3、 ,执行结果为 . 程序 :x=input(“x=”);y=x+2;print(%io(2),y);程序 :x=input(“x=”);y=2 x+2;print(%io(2),y);解析 两程序执行结果相同,即求 y=x+2 与 y=2x+2 的交点 .答案 0 29 给出下列语句:x=input(“x=”);if x3y=x x-1;4elsey=2;endendprint(%io(2),y);则当输入的 x0,5时,输出 y 的取值范围是 . 解析 该语句的功能是求函数 y .=2,3的 值因为 x0,5,所以当 x0,3)时, y=2x0,6);当 x=3 时, y=2;当 x(3,5

4、时, y=x2-1(8,24 .综上, y0,6)(8,24 .答案 0,6)(8,2410 用基本算法语句描述一个算法,要求输入两个实数,然后由小到大输出这两个数 .解 用算法语句描述为:a=input(“a=”);b=input(“b=”);if abt=a;a=b;b=t;print(%io(2),b,a);elseprint(%io(2),b,a);end 11 某批发部出售袜子 ,当购买少于 300 双时,每双批发价为 2.5 元;不少于 300 双时,每双批发价为 2.2 元 .试分别画出程序框图和用程序语言编写计算批发金额 .解 程序框图如图所示 .程序如下:i=input (“批发双数 i=”);if i=0 and i3005T=2.5 i;elseT=2.2 i;endprint(%io(2),T);

展开阅读全文
相关资源
猜你喜欢
  • BS ISO 13821-2002 Corrugated fibreboard - Determination of edgewise crush resistance - Waxed edge method《波纹纤维板 耐沿边缘挤压性的测定 上蜡边缘法》.pdf BS ISO 13821-2002 Corrugated fibreboard - Determination of edgewise crush resistance - Waxed edge method《波纹纤维板 耐沿边缘挤压性的测定 上蜡边缘法》.pdf
  • BS ISO 13826-2013 Metallic and other inorganic coatings Determination of thermal diffusivity of thermally sprayed ceramic coatings by laser flash method《金属及其他无机涂层 通过激光脉冲法测定热喷涂陶瓷涂层的.pdf BS ISO 13826-2013 Metallic and other inorganic coatings Determination of thermal diffusivity of thermally sprayed ceramic coatings by laser flash method《金属及其他无机涂层 通过激光脉冲法测定热喷涂陶瓷涂层的.pdf
  • BS ISO 13832-2013 Aerospace Wire aluminium alloy and copper-clad aluminium conductors General performance requirements《航空航天 铝合金和包铜铝导线电导线 通用性能要求》.pdf BS ISO 13832-2013 Aerospace Wire aluminium alloy and copper-clad aluminium conductors General performance requirements《航空航天 铝合金和包铜铝导线电导线 通用性能要求》.pdf
  • BS ISO 13837-2008 Road vehicles Safety glazing materials Method for the determination of solar transmittance《道路车辆 安全玻璃窗材料 阳光透射率的测定方法》.pdf BS ISO 13837-2008 Road vehicles Safety glazing materials Method for the determination of solar transmittance《道路车辆 安全玻璃窗材料 阳光透射率的测定方法》.pdf
  • BS ISO 13860-2016 Machinery for forestry Forwarders Terms definitions and commercial specifications《林业机械 短材集运机 术语 定义和商业规格》.pdf BS ISO 13860-2016 Machinery for forestry Forwarders Terms definitions and commercial specifications《林业机械 短材集运机 术语 定义和商业规格》.pdf
  • BS ISO 13875-2005 Liquid milk - Determination of acid-soluble -lactoglobulin content - Reverse-phase HPLC method《液体牛奶 酸溶的β-乳球蛋白含量测定 反相高效液相色谱分析法》.pdf BS ISO 13875-2005 Liquid milk - Determination of acid-soluble -lactoglobulin content - Reverse-phase HPLC method《液体牛奶 酸溶的β-乳球蛋白含量测定 反相高效液相色谱分析法》.pdf
  • BS ISO 13879-2000 Petroleum and natural gas industries - Content and drafting of functional specifications《石油和天然气工业 功能规范的内容和起草》.pdf BS ISO 13879-2000 Petroleum and natural gas industries - Content and drafting of functional specifications《石油和天然气工业 功能规范的内容和起草》.pdf
  • BS ISO 13885-1-2008 Binders for paints and varnishes Gel permeation chromatography (GPC) Tetrahydrofuran (THF) as eluent《涂料和清漆用粘合剂 凝胶渗透色谱法(GPC) 用四氢呋喃(THF)作洗提液》.pdf BS ISO 13885-1-2008 Binders for paints and varnishes Gel permeation chromatography (GPC) Tetrahydrofuran (THF) as eluent《涂料和清漆用粘合剂 凝胶渗透色谱法(GPC) 用四氢呋喃(THF)作洗提液》.pdf
  • BS ISO 13899-2-2005 Steel - Determination of Mo Nb and W contents in alloyed steel - Inductively coupled plasma atomic emission spectrometric method - Determination of Nb Content《钢.pdf BS ISO 13899-2-2005 Steel - Determination of Mo Nb and W contents in alloyed steel - Inductively coupled plasma atomic emission spectrometric method - Determination of Nb Content《钢.pdf
  • 相关搜索

    当前位置:首页 > 考试资料 > 中学考试

    copyright@ 2008-2019 麦多课文库(www.mydoc123.com)网站版权所有
    备案/许可证编号:苏ICP备17064731号-1