Python/Python 기초 (Basics)(2)
-
파이썬 퍼센트 구하기
############################################### # 전체값에서 일부값은 몇 퍼센트? 계산 # 공식은 "일부값 나누기 전체값 곱하기 100.0" ############################################### # 10은 100에서 몇 퍼센트? print "%.2f%%" % (10.0 / 100.0 * 100.0) # 출력 결과: 10.00% # 33은 100에서 몇 퍼센트? print "%.2f%%" % (33.0 / 100.0 * 100.0) # 출력 결과: 33.00% # 105는 300의 몇퍼센트? print "%.2f%%" % (105.0 / 300.0 * 100.0) # 출력 결과: 35.00% # 한달 봉급 156만원인 사람이, 음식 값..
2022.01.11 -
Python (Basics)
Python (Basics) Learn the basics of the Python programming language. The sequence is as follows. (Keyword) (Identifier) (Indentation) (Comment) (Keyword) (Keyword) is a string that is already reserved in the Python language, It cannot be used as the name of a variable or function, etc. There are 33 keywords in Python, as listed below. False, None, True, and, as, assert, break, class, continue, d..
2022.01.02