01-10807-개수세기 입력받아서 리스트 변수로 넣기 리스트 항목 개수 세기 N = int(input()) ARRAY = list(map(int, input().split())) NUMBER = i…
Read more »01-2739-구구단 a = int(input()) i = 1 while i < 10: print(f"{a} * {i} = {a*i}") i += 1 02-109…
Read more »백준 홈페이지 - 문제 - 단계별로 풀어보기 중 2. 조건문 문제와 내가 쓴 답들 1330번 문제 if 함수를 쓸줄만 알면 된다. a, b = map(int, input().spli…
Read more »백준 홈페이지 - 문제 - 단계별로 풀어보기 중 1. 입출력과 사칙연산 문제와 내가 쓴 답들 2557번 문제 print 함수를 쓸줄만 알면 된다. print("Hello …
Read more »db 생성을 위한 class 생성하기 lms/licenses/models.py from django.db import models class license_list(models.Model): acco…
Read more »장고 시작 request 받아서 응답하기 프로젝트 생성하기 $ mkdir lms $ cd lms # django 설치 $ pipenv install django # 현재 폴더에 lms라는 이름의 장고 프로젝…
Read more »Classes 클래스는 내가 원하는 Type의 object를 만들고 custom method를 적용 가능하게 한다. 얘를 들면 아래처럼 course 를 위한 object을 만들고 내가 원하는 regist…
Read more »Handling Exceptions try에 있는 모든 statement를 실행 ValueError가 발생하면 except에 있는 명령문이 실행된다. 에러가 없으면 except는 실행되지 않는다 에러가…
Read more »List 숫자, 문자, list 등 다양한 object으로 정의 가능하다 letters = ["a", "b", "c"] matrix = [[0, 1],…
Read more »Defining Functions 반복되는 statement들을 줄이고 프로그램을 잘게 쪼개어 유지관리가 용이하도록 function를 활용한다. 함수를 정의한 다음에는 두줄을 띄운다. 함수이름은 문자 또는…
Read more »pipenv 사용법 pipenv 설치 $ pip3 install pipenv 가상환경 만들기 & 실행하기 가상환경을 만들 프로젝트 폴더에서 pipenv shell 를 실행하면 해당 폴더에 가상환경이…
Read more »P rimitive type 변수 입력 변수이름은 왼쪽에, 변수 값은 오른 쪽에 쓴다. number = 10 출력 변수 내용을 출력한다 print(variable_name) Integer count …
Read more »원하는 것 ctrl + shift + F 눌렀을때, 혹은 파일저장할때 formatter가 실행되서 코드를 이쁘게 정렬하고 싶다. 상황 autopep8을 Extension 메뉴에서 다운 받아…
Read more »
Social Plugin