题海
让大学四年没有难题
首页
搜题
登陆
题目详情
填空题
如果输入4、-1、6、9、8、3、0,以下程序的输出结果是____.number = int(input('Enter an integer: ')) max = number while number != 0: number = int(input('Enter an integer: ')) if number > max: max = number print(max)
查看答案
学科:
默认课程
时间:
2026-06-29 10:35:13
相关题目
相关作业
题目1
填空题
以下代码段的输出结果是________. number = 15292if number == 0: print("0")else: while number: right_digit = number % 10 print(right_digit, end='') number //= 10
题目2
填空题
从键盘输入20个整数,输出它们的和.total = 0 for i in range(1,21): a= eval(input( )) total = ____ print("Total=", total)
题目3
填空题
以下程序执行的循环次数是____.fori in range(1, n + 1): # iteration
题目4
填空题
以下程序的输出结果是____.x = 15; while x > 10 and x < 50: x += 1 if x // 3: x += 1 break else: continue print(x)
题目5
填空题
如果输入4、-1、6、9、8、3、0,以下程序的输出结果是____.number = int(input('Enter an integer: ')) max = number while number != 0: number = int(input('Enter an integer: ')) if number > max: max = number print(max)
题目6
单选题
给定以下四种图案: 图案A 图案B 图案C 图案D 1 1 2 3 4 5 6 1 1 2 3 4 5 6 1 2 1 2 3 4 5 2 1 1 2 3 4 5 1 2 3 1 2 3 4 3 2 1 1 2 3 4 1 2 3 4 1 2 3 4 3 2 1 1 2 3 1 2 3 4 5 1 2 5 4 3 2 1 1 2 1 2 3 4 5 6 1 6 5 4 3 2 1 1 ( )是由如下程序生成的. for i in range(1, 6 + 1): for j in range(6, 0, -1): print(j if j <= i else " ", end = " ") print()
A. 图案A
B. 图案B
C. 图案C
D. 图案D
题目7
单选题
对于以下程序:total = d = 0 while d != 10.0: d += 0.1 total += total + d( )是正确的
A. 程序不能运行,因为total和d没有正确初始化
B. 程序永远不会停止,因为循环中d的值始终是0.1
C. 程序可能不会停止,原因是浮点数运算误差引起的数值错误
D. 循环结束后,total的值是0 +0.1 + 0.2 + 0.3 + ... + 1.9之和
题目8
单选题
以下程序的输出结果是( ).number = 25 isPrime = True for i in range(2,number): if number % i == 0: isPrime = False break print("i is", i, "isPrime is", isPrime)
A. i is 5 isPrime is True
B. i is 5 isPrime is False
C. i is 6 isPrime is True
D. i is 6 isPrime is False
题目9
单选题
以下程序的输出结果是( ).number = 25 isPrime = True i = 2 while i < number and isPrime: if number % i == 0: isPrime = False i += 1 print("i is", i, "isPrime is", isPrime)
A. i is 5 isPrime is True
B. i is 5 isPrime is False
C. i is 6 isPrime is True
D. i is 6 isPrime is False
题目10
单选题
以下程序的输出结果是( ).total = 0 item = 0 while item 4: continue print(total)
A. 15
B. 16
C. 17
D. 18
划词搜题
脚本
选中文字 即刻搜题
划词即搜 秒出答案
适配各大平台
完全免费 无限次数
1
安装
Tampermonkey
2
点击下方安装脚本
立即安装脚本
一键安装 · 永久免费~