第26653题 单选题
寻找水仙花数的Python程序横线处应填写的代码是

下面代码是寻找水仙花数的程序,横线处应该填写的代码是( )。水仙花数是指一个n位数(n≥3),其每位数字的n次幂之和等于它本身。

def is_narcissistic_num(num):
    str_num = str(num)
    num_digits = len(str_num)
    ————————————————————————————
    return num == sum_of_powers

for i in range(100, 10000):
    if is_narcissistic_num(i):
        print(i, "是水仙花数")
{{ option.label }}
子题{{ index + 1 }} {{ child.type_label }}
{{ option.label }}
✓ 正确 ◐ 部分正确 ✗ 错误
程序运行统计
暂无判题统计
提交{{ questionInfo.stats ? questionInfo.stats.submit_count : 0 }}次 正确率{{ statsAccuracy }}%
答案解析