# Authors:
# Date: 
# Practicum 2, Problem 1

""" This program prints the first five powers of a one-digit integer.
It takes one command line argument, b, which you should assume is an integer
between 1 and 9, inclusive. The first five powers of b are printed one per line
with enough padding so the the digit place lined up as in the following
examples:

>>> %Run p1.py 2
 1
 2
 4
 8
16
>>> %Run p1.py 5
  1
  5
 25
125
625
>>> %Run p1.py 9
   1
   9
  81
 729
6561
"""

import sys

b = int(sys.argv[1])

b0 = b**0
b1 = b**1
b2 = b**2
b3 = b**3
b4 = b**4

width = len(str(b4))

print(" " * (width - len(str(b0))), b0, sep="")
print(" " * (width - len(str(b1))), b1, sep="")
print(" " * (width - len(str(b2))), b2, sep="")
print(" " * (width - len(str(b3))), b3, sep="")
print(" " * (width - len(str(b4))), b4, sep="")

