首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
下面代码的输出结果是 a=2.0 b=1.0 s=0 for n in range(1,4): s+=a/b t=a a=a+b b=t print(round(s,2))
下面代码的输出结果是 a=2.0 b=1.0 s=0 for n in range(1,4): s+=a/b t=a a=a+b b=t print(round(s,2))
admin
2019-09-02
12
问题
下面代码的输出结果是
a=2.0
b=1.0
s=0
for n in range(1,4):
s+=a/b
t=a
a=a+b
b=t
print(round(s,2))
选项
A、5.17
B、3.5
C、6.77
D、8.39
答案
A
解析
转载请注明原文地址:https://kaotiyun.com/show/e36p777K
本试题收录于:
二级Python题库NCRE全国计算机二级分类
0
二级Python
NCRE全国计算机二级
相关试题推荐
在考生文件夹下完成如下操作:1.打开表单one,如图1所示,通过设置控件的相关属性,使得表单开始运行时焦点在“打开”命令按钮上,并且接下来的焦点的移动顺序是“关闭”和“退出”。2.打开表单two,如图2所示,使用“布局”工具栏的“顶边
在考生文件夹下完成下列操作:在考生文件夹下创建一个下拉式菜单mymenu.mnx,并生成菜单程序mymenu.mpr。运行该菜单程序时会在当前vfp系统菜单的末尾追加一个“考试”子菜单,如下图所示。菜单命令“统计”和“返回”的功能都通
在考生文件夹下完成如下简单应用:1.modil.prg程序文件中SQLSELECT语句的功能是查询目前用于3个项目的零件(零件名称),并将结果按升序存入文本文件results.txt中。给出的SQLSELECT语句中在第1、3、5行各有一处错
在考生文件夹下完成下列操作:在考生文件夹下有一表单文件formone.scx和一个自定义类库文件classlibone.vex。打开表单文件formone.scx,然后在表单设计器环境下完成如下操作。1.将表单的标题设置为“简单操作”,
表名为Employee的表结构是(职工号,姓名,工资),建立表Employee的sQL命令是
在VisualFoxPro中,以下描述中错误的是
下面属于黑盒测试方法的是
在视图设计器中有,而在查询设计器中没有的选项卡是()。
说明数组后,数组元素的初值是()。
下面图中属于软件设计建模工具的是()。
随机试题
在铸件上加工一个M20的不通螺纹孔,螺纹的有效深度为50mm,求底孔深度?
2002年5月,对实施西部大开发战略,促进西南地区经济和社会发展,加快沿线人民脱贫致富,增进民族团结具有重要意义的我国铁路全线开通()
重度核左移指外周血白细胞分类计数时,杆状核中性粒细胞的比值
下列房屋租赁行为中,符合相关规定的是()。
地震区轻型木结构房屋梁与柱的连接做法,正确的是()。
营业税按行业实行有差别的比例税率,其中适用5%营业税税率的是()。
某企业为增值税一般纳税人,适用的增值税税率为17%,该企业2015年12月初“应付职工薪酬”科目贷方余额为286万元,12月发生的有关职工薪酬的业务资料如下:(1)以银行存款支付上月的应付职工薪酬,并按规定代扣代缴职工个人所得税6万元和个人负担的社会
反映一个国家配合政治、经济、科技体制而确定下来的学校办学形式、层次结构、组织管理等相对稳定的运行模式和规定,这是指()。
2003年,浙江省谷物类粮食种植面积为113.62万公顷(注:1公顷=15亩),比上年减少22.79万公顷;谷物类粮食的总产量达700.60万吨,比上年减少141.68万吨。以下关于2003年谷物类粮食的生产情况的说法中,不正确的一项是()。
扭转希波战争战局的战役是()。
最新回复
(
0
)