首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
下面代码的执行结果是 desserts=[’ice cream’,’chocolate’,’apple crisp’,’cookies’] favorite_dessert=’apple crisp’ for dessert in desserts: if
下面代码的执行结果是 desserts=[’ice cream’,’chocolate’,’apple crisp’,’cookies’] favorite_dessert=’apple crisp’ for dessert in desserts: if
admin
2019-09-02
20
问题
下面代码的执行结果是
desserts=[’ice cream’,’chocolate’,’apple crisp’,’cookies’]
favorite_dessert=’apple crisp’
for dessert in desserts:
if dessert==favorite_dessert:
print(’’%s is my favorite dessert!”%dessert.title())
选项
A、chocolate is my favorite dessert!
B、ice cream is my favorite dessert!
C、apple Crisp is my favorite dessert!
D、Apple Crisp is my favorite dessert!
答案
D
解析
转载请注明原文地址:https://kaotiyun.com/show/336p777K
本试题收录于:
二级Python题库NCRE全国计算机二级分类
0
二级Python
NCRE全国计算机二级
相关试题推荐
1.在考生文件夹下创建一个名为“订单管理”的数据库,将已有的employee、orders和customer三个表添加到该数据库巾。2.为orders表建立一个普通索引,索引名为nf,索引表达式为“year(签订日期)”。3.为empl
在考生文件夹下完成下列操作:1.修改并执行程序temp。该程序的功能是根据“教师表”和“课程表”计算讲授“数据结构”这门课程,并且“工资”大于等于4000的教师人数。注意:只能修改标有错误的语句行。不能修改其他语句。2.在“学校”数据库中(在基
在考生文件夹下完成如下简单应用:1.使用SQL语句完成下面的操作:根据“国家”和“获奖牌情况”两个表统计每个国家获得的金牌数(“名次”为1表示获得一块金牌),结果包括“国家名称”和“金牌数”两个字段,并且先按“金牌数”降序排列,若“金牌数”相同再按“
1.在考生文件央下新建一个名为“图书管理”的项目文件。2.在项目中新建一个名为“图书”的数据库。3.将考生文件夹下的所有自由表添加到“图书”数据库中。4.在项目中建立查询book_qu,其功能是查询价格大于等于10的图书(bo
在考生文件夹下,完成如下操作:1.打开考生文件夹下的表单one,如下图所示,编写“显示”命令按钮的Click事件代码,使表单运行时单击该命令按钮则在Text1文本框中显示当前系统日期的年份(提示:通过设置文本框的Value属性实现,系统日期函数是
在考生文件夹下完成如下简单应用:1.使用SQL语句完成下面的操作:根据“国家”和“获奖牌情况”两个表统计每个国家获得的金牌数(“名次”为1表示获得一块金牌),结果包括“国家名称”和“金牌数”两个字段,并且先按“金牌数”降序排列,若“金牌数”相同再
下面程序的运行结果是SETTALKOFFn=lprocl(n)?n+2PROCEDUREproclPARAMETERSnFORk=2TO4n=n+kEN
在下面的VisualFoxPro表达式中,运算结果为逻辑真的是
随机试题
政党制度影响着政策执行的()
22,24,27,32,39,()。
在保证安全可靠的前提下,浅基础埋深设计时应考虑()。[2017年真题]
由于抽样调查中只对一部分个体进行调查,而普查对所有个体进行了调查,因而普查的结果一定比抽样调查准确。()[2012年初级真题]
一级文件(押品)主要包括()。
警械、武器使用权,是指公安机关依法享有使用警械、武器实施管理、守卫、保护、制服和杀伤的权力,由下列具体权力组成()。
历史上曾出现过两种相互对立的教学方法思想,即_____、_____。
事务处理阶段的代表性系统是______。
下列说法正确的是______。
若某二叉树的前序遍历访问顺序是abdgcefh,中序遍历访问顺序是dgbaechf,则其后序遍历的结点访问顺序是
最新回复
(
0
)