题目内容 (请给出正确答案)
[单选题]

建立文件add.py,写入以下代码: print(“the first number is:”) print(30+50) print(“the second number is:”) 30*50 保存并运行脚本文件,输出结果为:

A.the first number is: 80 the second number is: 150

B.the first number is: 80 the second number is: 150

C.the first number is: the second number is:

D.the first number is: 80 the second number is:

答案
the first number is: 80 the second number is:
如搜索结果不匹配,请 联系老师 获取答案
您可能会需要:
您的账号:,可能会需要:
您的账号:
发送账号密码至手机
发送
更多“建立文件add.py,写入以下代码: print(“the …”相关的问题

第1题

建立文件add.py,写入以下代码: print(“the first number is:”) print(30+50) print(“the second number is:”) 30*50 保存并运行脚本文件,输出结果为:

A.the first number is: 80 the second number is: 150

B.the first number is: 80 the second number is: 150

C.the first number is: the second number is:

D.the first number is: 80 the second number is:

点击查看答案

第2题

对于下面代码,选项中描述错误的是()fname = input("请输入要写入的文件:") fo = open(fname, "w+") ls = ["A", "B", "C", "D"] fo.writelines(ls) fo.seek(0) for line in fo: print(line) fo.close()

A.执行代码时,从键盘键入"a.txt",则a.txt被创建

B.fo.writelines(ls)将ls列表中的全部字符串写入文件

C.代码主要功能为向文件写入一个列表中的字符串,并打印输出结果

D.fo.seek(0)这行代码如果省略,也能打印输出文件内容

点击查看答案

第3题

下面哪个选项不是Python支持的文件写入方式?

A.print()函数

B.文件对象.write()

C.文件对象.writeline()

D.文件对象.writelines()

点击查看答案

第4题

要向顺序文件中写入一个数据项,不能用的函数是:

A.write

B.Input

C.print

D.append

点击查看答案

第5题

要向顺序文件中写入一个数据项,不能用的函数是:

A.write

B.Input

C.print

D.append

点击查看答案

第6题

1、下面叙述正确的是。 知识点:集合

A.以下代码的输出结果为8。 s = {8,16,9,10,5} ls = list(s) ls.sort() print(ls[1])

B.以下代码的输出结果为16。 s = {8,16,9,10,5} print(s[1])

C.以下代码的输出结果为5。 s = {8,16,5,10,5} print(len(s))

D.以下代码的输出结果为{5,8,9,10,16}。 s = {8,16,9,10,5} s.sort() print(s)

点击查看答案

第7题

下面叙述正确的是()。 知识点:集合

A.以下代码的输出结果为8。 s = {8,16,9,10,5} ls = list(s) ls.sort() print(ls[1])

B.以下代码的输出结果为16。 s = {8,16,9,10,5} print(s[1])

C.以下代码的输出结果为5。 s = {8,16,5,10,5} print(len(s))

D.以下代码的输出结果为{5,8,9,10,16}。 s = {8,16,9,10,5} s.sort() print(s)

点击查看答案

第8题

下面叙述正确的是。 知识点:集合

A.以下代码的输出结果为8。 s = {8,16,9,10,5} ls = list(s) ls.sort() print(ls[1])

B.以下代码的输出结果为16。 s = {8,16,9,10,5} print(s[1])

C.以下代码的输出结果为5。 s = {8,16,5,10,5} print(len(s))

D.以下代码的输出结果为{5,8,9,10,16}。 s = {8,16,9,10,5} s.sort() print(s)

点击查看答案

第9题

1、下面叙述正确的是()。 知识点:集合

A.以下代码的输出结果为8。 s = {8,16,9,10,5} ls = list(s) ls.sort() print(ls[1])

B.以下代码的输出结果为16。 s = {8,16,9,10,5} print(s[1])

C.以下代码的输出结果为5。 s = {8,16,5,10,5} print(len(s))

D.以下代码的输出结果为{5,8,9,10,16}。 s = {8,16,9,10,5} s.sort() print(s)

点击查看答案

第10题

请选择正确的选项,将二进制数据写入到二进制文件"f.dat"中: void setup(){ byte []b1= new byte[10] ; for (int i = 0; i < b1.length; i++) { b1[i]=byte(i); print(b1[i]); print(" "); } //将字节数组中的信息写入文件中 }

A.saveBytes(b1,"f.dat");

B.saveFiles("f.dat",b1);

C.saveBytes("f.dat",b1);

D.saveFiles(b1,"f.dat");

点击查看答案

第11题

以下代码哪个不能够打印出Hello world!?

A.print("Hello world!")

B.print("Hello","world!")

C.print("Hello") print("world!")

D.print("Hello", end=' ') print("world!")

点击查看答案
发送账号至手机
密码将被重置
获取验证码
发送
温馨提示
该问题答案仅针对搜题卡用户开放,请点击购买搜题卡。
马上购买搜题卡
我已购买搜题卡, 登录账号 继续查看答案
重置密码
确认修改
温馨提示
每个试题只能免费做一次,如需多次做题,请购买搜题卡
立即购买
稍后再说
警告:系统检测到您的账号存在安全风险

为了保护您的账号安全,请在“赏学吧”公众号进行验证,点击“官网服务”-“账号验证”后输入验证码“”完成验证,验证成功后方可继续查看答案!

微信搜一搜
赏学吧
点击打开微信
警告:系统检测到您的账号存在安全风险
抱歉,您的账号因涉嫌违反赏学吧购买须知被冻结。您可在“赏学吧”微信公众号中的“官网服务”-“账号解封申请”申请解封,或联系客服
微信搜一搜
赏学吧
点击打开微信