我想右對齊的數值這是我從打印得到的,但我得到一個錯誤:右對齊錯誤()
'float' object has no attribute 'rjust'
這裏是我的代碼,我想使用它在。我應該如何去正確對準所有的數值我得到print
:
enterValue = float(input("The input value is: "))
# We know that the circumference of a circle is 2*pi*r.
CircumferenceV = (2*math.pi*enterValue)
print("The Circumference is : %0.2f" %(circleCircumference.rjust(10)))