Q:

Write a Python program to print the following integers with "*" on the right of specified width

0

Write a Python program to print the following integers with "*" on the right of specified width. 

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

x = 3
y = 123
print("\nOriginal Number: ", x)
print("Formatted Number(right padding, width 2): "+"{:*< 3d}".format(x));
print("Original Number: ", y)
print("Formatted Number(right padding, width 6): "+"{:*< 7d}".format(y));
print()

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Similar questions


need a help?


find thousands of online teachers now