print "This is a program that converts a number in base 10 to a number in base 8 - up to 4 places."
a = input ("Enter the number in base 10: ")
b = 512 #8 cubed place
c = 64 # 8 squared place
d = 8 # 8 place
e = 1 # ones place

eightcubed = a/b # the number divided by 8 cubed
eightsquared = a%b/c # the remainder divided by 8 squared
eight = ((a%b)%c)/d # the reminder divided by 8
ones = (((a%b)%c)%d) # whats left!

print "Here it is in base eight:" + str(eightcubed) + str(eightsquared) + str(eight) + str(ones)

 
