4.
运行下列程序,输出的结果是?( )
def fun(a, n):
s = 0
for i in range(1, n+1):
temp = str(a)*i
s += int(temp)
return s
print(fun(1, 3))
A.3
B.6C.12
D.123
4.
运行下列程序,输出的结果是?( )
def fun(a, n):
s = 0
for i in range(1, n+1):
temp = str(a)*i
s += int(temp)
return s
print(fun(1, 3))
A.3
B.6C.12
D.123
Scratch3.0 全国青少年软件编程等级考试 Python Scratch图形化一级 Scratch图形化四级 Scratch图形化三级 Scratch图形化二级 电子学会