第25559题 判断题
判断修改Python九九乘法表的f-string格式化参数能否实现指定对齐输出

下面Python代码执行后输出如左图所示,将f" {i*j}"修改为f" {i*j:3}"即可实现右图输出。

输出效果对比

for i in range(1, 10):
    for j in range(1, 10):
        print(f" {i*j}", end = " ")
    print()
{{ option.label }}
子题{{ index + 1 }} {{ child.type_label }}
{{ option.label }}
✓ 正确 ◐ 部分正确 ✗ 错误
程序运行统计
暂无判题统计
提交{{ questionInfo.stats ? questionInfo.stats.submit_count : 0 }}次 正确率{{ statsAccuracy }}%
答案解析