글

라벨이 print인 게시물 표시

[Python] format 활용하여 다양한 형식으로 출력하기

[Python] format 활용하여 다양한 형식으로 출력하기 #practice 0202 ===RESULT=== __Centered___ Left-aligned_ Right-aligned ______1______ 1____________ ____________1 _____12______ 12___________ ___________12 _____123_____ 123__________ __________123 ____1234_____ 1234_________ _________1234 #practice 0203 ===RESULT=== __Centered___ Left-aligned_ Right-aligned _____1.1_____ 1.1__________ __________1.1 ____2.12_____ 2.12_________ _________2.12 ____3.123____ 3.123________ ________3.123 ___4.1234____ 4.1234_______ _______4.1234 #practice 0204 ===RESULT===   Centered    Left-aligned  Right-aligned      1.1      1.1                     1.1     2.12      2.12                   2.12     3.123     3.123                 3.123    4.12...

[Python] print( ) 함수를 활용하여 손익계산서 만들기

이미지
[Python] print( ) 함수를 활용하여 손익계산서 만들기 #print() 함수와 .format을 활용하여 적정하게 재무제표를 만드는 문제이다.  print("{0:=>120}".format("")) print("Sample Small Business Balance Sheet") print("{0:=>120}".format("")) print("{0:-<30}{1:16}".format("Assets(current)",""),end=" ") print("{0:-<45}{1:15}".format("Liabilities and Owners' Equity","")) print("{0: <30}{1:15,.2f}$".format("Cash",6600.00),end=" ") print("{0:-<35}{1:15}".format("Liabilities","")) print("{0: <30}{1:15,.2f}$".format("Accounts Receivable",6200.00),end=" ") print("{0: <30}{1:15.2f}$".format("Notes Payable",5000.00)) print("{0:-<30}{1:15} ".format("Assets(non-current)",""),end=" ") print("{0: <30}{1:15.2f}$".for...