글

라벨이 출력인 게시물 표시

[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...

[R_bigdata] R로 'Hello, World' 출력하기

#day01_01_hello.R #hello, world 출력 #ctrl + enter:현재 라인을 실행한 후에 실행할 수 있는 다음 라인으로 이동 한다. #alt + enter:현재 라인을 실행한 후에 현재 라인에서 대기한다. #출력하는 방법(1. print() , 2. sprintf() , 3.값을 그대로 호출) #1. print()함수를 이용하기 print('Hello,World') #2. 값을 그대로 호출 'Hello,World' #r에게 출력을 하는데 모양(포멧)을 맞춰서 출력하라고 하기 #예) 000원 결제 sprintf('%d 원 결제',5000) #다음의 2가지가 어떻게 다를까요(데이터의 형태:''의 유무) print(5000+5000) #print('5000'+'5000') Error 발생(문자끼리의 연산)