P

@parkajeong

11/14 내장 함수 / 사용자 정의 함수

Python
15 hours ago
''' print('Hello world!') #출력하는 함수 a = input() #입력하는 함수 sum([10, 20, 30]) #합계를 구하는 함수 len("abcdef") #길이를 구하는 함수 max([40, 50, 30, 20, 10]) #최댓값 구하는 함수 min([30, 40, 20, 10, 50]) #최솟값 구하는 함수 ''' def add():

11/14 포인터 / 메모리 할당

C
17 hours ago
#include <stdio.h> #include <stdlib.h> int main() { int a = 10; int *p = &a; printf("%d\n", a); printf("%p\n", &a); printf("%d\n", *p);

11/10 튜플 딕셔너리

Python
4 days ago
# 변하지 않는 자료 tuple = (10, 20, 30) () (1,) print(tuple[1]) print(tuple[0:2]) print(len(tuple)) # Key & Value 서로 짝이 있는 자료 dict = {'apple': '사과'}

11/7 튜플, 딕셔너리

Python
1 week ago
# 튜플 tuple1 = (1, ) tuple2 = (1, 2, 3, 4) print(tuple2[2]) #인덱싱 print(tuple2[1:3]) #슬라이싱 print(tuple1 + tuple2) #튜플 더하기 print(tuple2 * 2) #튜플 곱하기 print(len(tuple2)) #튜플 길이 구하기

11/7 파이썬 복습 1

Python
1 week ago
num = 10 print(num) num2 = 2 print() python_class = ['강민', '진후', '서진', '윤우'] print(python_class[0]) print(python_class[1:3])

10/31 문자열, 리스트 메서드

Python
2 weeks ago
a = [1, 2, 3, 4, 5] a.pop(2) #인덱스 2번째 삭제 a.pop() #맨 마지막 삭제 print(a) b = [1, 1, 1, 2, 3, 1] print(b.count(1)) #문자열을 리스트로 만들기 c = "i like python"

10/31 while, break, continue

Python
2 weeks ago
# i = 0 # while i < 10: # print(i) # i+=1 # i = 10 # while i > 0: # print(i) # i -= 2

10/31 배열과 함수, 2차원 배열

C
2 weeks ago
#include <stdio.h> /* 배열과 함수 void PrintArray(int a[], int size); int main() { int nums1[5] = { 7, 15, 10, 4, 11 }; PrintArray(nums1, 5); return 0; }

10/24 반복문, for문, range 함수

Python
3 weeks ago
''' for i in [1, 2, 3]: print(i) for i in "abcd": print(i) for i in range(5): #0~4 print(i)

10/24 random

C
3 weeks ago
#include <stdio.h> #include <stdlib.h> #include <time.h> int main() { srand(time(NULL)); //난수 초기화 printf("%d\n", rand() % 5); //0~4 printf("%d\n", rand() % 5+1); //1~5 printf("%d\n", rand() % 5-1); //-1~3 }

10/24 배열

C
3 weeks ago
#include <stdio.h> #include <string.h> int main() { int arr_i[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; arr_i[0] = 5; arr_i[1] = 10; arr_i[2] = 15; printf("%d %d %d\n", arr_i[0], arr_i[1], arr_i[2]);

10/24 내장 함수, 사용자 정의 함수

Python
3 weeks ago
''' print(max([10, 20, 30])) 최댓값 print(min([10, 20, 30])) 최솟값 ''' num = [10, 20, 30, 40, 50] m = 0 for i in range(len(num)): if num[i] > m: m = num[i]

10/24 튜플, 딕셔너리

Python
3 weeks ago
tuple_1 = (1,) print(tuple_1) # {'key': 'value'} # [10, 20, 30] 인덱스 0 dict = {'name': 'kimalgo', 'age': '13'} print(dict['name']) #딕셔너리 변경

10/17 함수

C
4 weeks ago
#include <stdio.h> /* 반환형 함수이름(매개변수){ 코드 } */ int add(int a, int b); //함수 선언 void add2(int a, int b);

10/17 문자열, 리스트 메서드

Python
4 weeks ago
a = [10, 20, 30, 40, 50] a.pop(2) a.pop() print(a) b = [1, 1, 3, 1, 2, 1] print(b.count(1)) c = "i like python" print(c.split(" "))

10/17 while문, break, continue

Python
4 weeks ago
# i = 0 # while i < 10: # print(i) # i += 1 # i = 0 # while True: # if i > 5: # break # print(i)

10/10 elif문, 리스트 메서드

Python
1 month ago
n = int(input()) if n >= 90: print("A") elif n >= 80: print("B") elif n >= 70: print("C") else: print("F")

10/10 조건문 if, continue, break, switch

C
1 month ago
#include <stdio.h> int main() { /* int age = 2; if(age>=8 && age<=13){ printf("초등학생입니다.\n"); }else if(age>=14 && age<=16){ printf("중학생입니다.\n");

10/10 반복문 for문

Python
1 month ago
# for i in [1, 2, 3]: # print(i) # for i in "abcd": # print(i) # for i in range(10): #0~9 10번 반복 # print(i) # for i in range(1, 11): #1~10 10번 반복

10/10 리스트 메서드, 시퀀스의 특징

Python
1 month ago
a = [10, 20, 40, 50] #append() 맨 뒤에 삽입 a.append(60) print(a) #insert() 내가 원하는 위치에 삽입 a.insert(2, 30) print(a)