PYTHON(13)
-
(Python) 문제 풀이 1
20 a =int(input('첫번째 값입력')) b =int(input('두번째 값입력')) if a> 1 and a11 and b= 0 and a = 10 and b = 0 and a = 10 and b = row or y >= col: continue elif matrix[x][y] == "*": count += 1 print(count, sep='', end='') keys = input().split() values = map(int, input().split()) x = dict(zip(keys, values)) y = {key : value for key, value in x.items() if key != 'delta' and value !=30 } # if x.get('delta') ..
2020.10.19 -
(Python) 성적관리 프로그램
import pickle # 초기 변수선언 kor = None eng = None mat = None name =None # 딕셔너리 생성 score = {'kor':kor, 'mat':mat , 'eng':eng } student = {name : score} student = {} while True : num= int(input("추가1./검색2./수정3./삭제4./전체출력5./저장-종료6.")) if num== 6: break elif num== 1: name =input('이름을 입력해주세요.') kor =int(input('국어점수를 입력해주세요.')) eng =int(input('영어점수를 입력해주세요.')) mat =int(input('수학점수를 입력해주세요.')) score = {'kor..
2020.10.15 -
(Python)기본문법2
year =[2011,2012,2013,2014,2015,2016,2017,2018] population =[10249679,10195318,10143645,10103233,10022181,9930616,9857426,9838892] print(year[-3:] + list(population[-3:])) n= -32 , 75, 97, -10 ,9,32,4,-15,0,76,14,2 print(n[1:len(n):2]) print(n[1: :2]) print(n[1:12:2]) x= (1 ,2,3,4,5,6,7,8,9,10) print(x[0:5]) lux =[490 ,334, 550 , 18.72] # 딕셔너리는 {} 중괄호 키:값 형식으로 되어있다 lux = {'health':490 , 'mana':3..
2020.10.13 -
(Python)시퀀스
a = [0 ,10 ,20 ,30 ,40 ,50 ,60 ,70 ,80 ,90] #안에 30의값이 들어가있는지 확인 print(30 in a) #안에 100의값이 들어가있는지 확인 print(100 in a) #안에 30의값이 들어가있지 않은지 확인 print(30 not in a) #안에 100의값이 들어가있지 않은지 확인 print(100 not in a) #------------------------------------------------# # 값이 포함되었는지 확인 print(43 in (38,76,43,62,19)) print(1 in range(10)) print('P' in 'Hello, Python') #-----------------------------------------------..
2020.10.12 -
VS code 설치
code.visualstudio.com/ Visual Studio Code - Code Editing. Redefined Visual Studio Code is a code editor redefined and optimized for building and debugging modern web and cloud applications. Visual Studio Code is free and available on your favorite platform - Linux, macOS, and Windows. code.visualstudio.com
2020.10.12 -
(Python) 기본문법
객체 비교
2020.10.12