목록전체 글 (203)
studyplan
print() , \ 포함문제 2557 Hello World 10718 We love kriii 10171 고양이 10172 개 print() , input() , int(input()) 문제 18108 1998년생인 내가 태국에서는 2541년생?!
# 상품이름 product_name = input('상품명을 입력하세요 : ') # 원래가격 product_price = int(input('원가를 입력하세요 : ')) discount_percent = int(input('할인율을 입력하세요 : ')) # 할인가격 discount =product_price - product_price * (discount_percent/100) # 메세지 출력 print(f'{product_name}은(는) {product_price}원입니다.') print(f'{product_name}의 {discount_percent}% 할인가격은 {discount}원입니다.') ---------------------------------------------------------..
# 상품이름 product_name = input('상품명을 입력하세요 : ') # 상품가격 product_price = int(input('원가를 입력하세요 : ')) # 할인가격 discount = product_price - product_price*0.1 # 메세지 출력 print(f'{product_name}은(는) {product_price}원입니다.') print(f'{product_name}의 10% 할인가격은 {discount}원입니다.') ---------------------------------------------------------------------------- 상품명을 입력하세요 : 냉장고 원가를 입력하세요 : 30000 냉장고은(는) 30000원입니다. 냉장고의 10% ..
# a = 10 # print(a) # input() = 키보드 입력을 처리하는 함수 # - 입력 데이터가 무자열로 처리됨 . # - 수치연산이 불가능함 # - 수치연산을 하려면 input() 앞에 int로 감싸준다 # - int(input()) : 입력된 문자를 정수로 변환 # - 정확한 숫자를 입력하지 안흥면 에러발생 ! a = input() b = input() # 문자형 c = int(input()) # 정수형 d = int(input()) print(type(a)) # a의 형태는 ? str = 문자형 , print(a + '10') # 3 + 10 = 둘다 문자형이기때문에 310으로 나타냄 print(a + b) # 둘다 문자형이기때문에 3 4 print(c + d) # 정수형이기 때문에 5 ..
한캡쳐 플러스 - 받아서 써보시길 간편합니다 / 사실 내가 새로운 컴퓨터로 옮길때 쓰려고 올림
코딩테스트 https://www.acmicpc.net/ Baekjoon Online Judge Baekjoon Online Judge 프로그래밍 문제를 풀고 온라인으로 채점받을 수 있는 곳입니다. www.acmicpc.net
보기 - 명령팔레트 + >configure task - { // See https://go.microsoft.com/fwlink/?Link... // for the documentation about the tasks.json format "version": "2.0.0", "tasks": [ { "label": "Project Label", "type": "shell", "command": "python", "args": [ "${file}" ], "presentation": { "reveal": "always", "panel": "new" }, "options": { "env": { "PYTHONIOENCODING": "UTF-8" } }, "group": { "kind": "build", "isDe..
# 지하철 # 리스트 [] #지하철 칸별로 10명 , 20명 ,30명 subway = [10 , 20 , 30 ] print(subway) # [10, 20, 30] subway = ["유재석" , "조세호" , "박명수"] # 0=유재석 , 1=조세호 , 2=박명수 print(subway) # ['유재석', '조세호', '박명수'] #조세호씨가 몇번째 칸에 타고있는가 ? -index print(subway.index("박명수")) # 2 #하하씨가 다음칸에 탐 #(subway = subway.append("하하")) 이거 안되고 subway.append("하하") # 이건됨 / print(subway) # ['유재석', '조세호', '박명수', '하하'] # 정형돈을 유재석과 조세호 사이에 태움 sub..