运行代码,输出结果为()。
#!/usr/bin/env python3
N=100
Sum=0
Counter=1
While counter <n:
Sum+counter
Counter +=1
Print("1到%d之和为:%d"%(n,sum)
#!/usr/bin/env python3
N=100
Sum=0
Counter=1
While counter <n:
Sum+counter
Counter +=1
Print("1到%d之和为:%d"%(n,sum)
A1到100之和为:5000
B1到100之和为:0
C1到100之和为:2050
D1到100之和为:5020
相关试题
-
运行代码,输出结果为()。#!/usr/bin/env python3N=100Sum=0Counter=1While counter <n:Sum+counterCounter +=1Prin
-
运行代码,输出结果为()。#!/usr/bin/envpython3N=100Sum=0Counter=1Whilecounter<=n:Sum+counterCounter+=1Print(1
-
n代码运行结果为(____)。$;$def Sum(a, b=3, c=5):$;$ return sum([a, b, c])$;$print(Sum(a=8, c=2))$;$print(
-
L代码运行完的结果是() declare @counter int set @counter=1 while @counter<3 begin set @counter=@counter+1
-
写出下面代码的运行结果 ( )。 def Sum(a, b=3, c=5): print(a,b,c) Sum(a=8, c=2)