a=5678.1023
b=54578.1023
print("this is monthly salary:",format(a,'>15,.2f'))
print("this is monthly expenses:",format(a,'>13,.2f'))
print("this is monthly saving:",format(a,'>15,.2f'))
print("this is monthly total:",format(a,'>16,.2f'))
output:
example 2:
a=5678.1023 b=54578.1023 print("this is monthly salary:",format(a,'>15,.2f')) print("this is monthly expenses:",format(a,'>13,.3f')) print("this is monthly saving:",format(a,'>15,.4f')) print("this is monthly total:",format(a,'>16,.5f'))
output:
b=54578.1023
print("this is monthly salary:",format(a,'>15,.2f'))
print("this is monthly expenses:",format(a,'>13,.2f'))
print("this is monthly saving:",format(a,'>15,.2f'))
print("this is monthly total:",format(a,'>16,.2f'))
output:
example 2:
a=5678.1023 b=54578.1023 print("this is monthly salary:",format(a,'>15,.2f')) print("this is monthly expenses:",format(a,'>13,.3f')) print("this is monthly saving:",format(a,'>15,.4f')) print("this is monthly total:",format(a,'>16,.5f'))
output: