8класс
Страницы 219-221 параграф 5 2 вопрос / задание 6, ГДЗ по информатике за 8 класс к учебнику Босовой просвещение
Номер 6. Что будет выведено в результате работы следующей программы?
a = 1; b = 2; c = 3
print("{:3}".format(a))
print("{:2}{:1}{}".format(b, b, b))
print("{}{}{}{}{}".format(c, c, c, c, c))
print("{:2}{:1}{}".format(b, b, b))
print("{:3}".format(a))
a = 1; b = 2; c = 3
print("{:3}".format(a))
print("{:2}{:1}{}".format(b, b, b))
print("{}{}{}{}{}".format(c, c, c, c, c))
print("{:2}{:1}{}".format(b, b, b))
print("{:3}".format(a))
Вывод
a = 1; b = 2; c = 3
print("{ :3 }".format(a))
print("{ :2 } { :1 } { } ".format (b, b, b) )
print("{ } { } { } { } { } ".format (c, c, c, c, c) )
print("{ :2 } { :1 } { } ".format (b, b, b) )
print("{ :3 } ".format (a))
print("{ :3 }".format(a))
print("{ :2 } { :1 } { } ".format (b, b, b) )
print("{ } { } { } { } { } ".format (c, c, c, c, c) )
print("{ :2 } { :1 } { } ".format (b, b, b) )
print("{ :3 } ".format (a))
1
222
33333
222
1
222
33333
222
1
Примечание: внутри фигурных скобок и между ними не должно быть пробелов!