P

@parkajeong

1/15 파이썬 전체 복습 2 (민준)

Python
9 months ago
list = [3, 5, 7, 9, 12, 14, 18] list.append(20) #리스트 마지막에 원소 추가하기 list.insert(1, 4) #리스트의 특정 위치에 원소 추가하기 list.remove(12) #리스트의 특정 원소 삭제하기 list.sort() #리스트 정렬하기 print(list) a = [] a.append("호랑이") a.append("고양이") a.append("강아지")

1/15 c언어 반복문 for문 (도윤)

C
9 months ago
#include <stdio.h> int main() { //for문 /* for(int i=1;i<=10;i++){ printf("hello world! %d\n", i); } for(int i=10;i>=1;i--){

1/15 c언어 변수와 상수, 입출력 (도윤)

C
9 months ago
#include <stdio.h> int main() { /* int a; //변수 선언 a = 10; //초기화 int b = 20; //변수 선언과 초기화 float c = 1.2; //실수형 변수

1/14 파이썬 프로젝트 가위바위보 (담미, 정윤)

Python
10 months ago
import random cpu = random.choice(['가위', '바위', '보']) user = input() if cpu == user: print('비겼습니다.') elif cpu == '가위' and user == '바위': print('이겼습니다.') elif cpu == '바위' and user == '보':

1/13 파이썬 전체 복습 (민준)

Python
10 months ago
3 #정수형 3.1 #실수형 'hello' #문자열 [1, 2, 3] #리스트 print(1+2) #더하기 print(2-1) #빼기 print(2*1) #곱하기 print(2/1) #나누기 print(2%1) #나머지 list = ['a', 'p', 'p', 'l', 'e']

1/13 파이썬 1주차 (도윤, 태한, 태영)

Python
10 months ago
a = [] #빈 리스트 b = [2, 10, 5 , 'd', [1, 2]] print(b) #리스트 전체 print(b[1]) #인덱싱 print(b[2:4]) #슬라이싱 c = int(input('정수 하나를 입력하세요.\n')) #정수 d = input() #문자열 f = str(input()) #문자열 d = int(d) #형 변환

1/12 파이썬 프로젝트 최댓값, 점심메뉴 (담미, 정윤)

Python
10 months ago
import random number = [10,24,35,3,76,34,15,45,80,34] def my_max(number): m = 0 for i in number: if i > m: m = i print(m)

1/10 c언어 반복문 (예린, 예원)

C
10 months ago
#include <stdio.h> int main() { int a = 20; printf("%d\n", ++a); printf("%d\n", a++); printf("%d\n", a); //for문 // for(선언; 조건; 증감){

1/10 c언어 변수, 상수, 입출력 (예린, 예원)

C
10 months ago
#include <stdio.h> int main() { int age; //변수 선언 age = 13; //변수 초기화 age = 15; int age2 = 14; //변수의 선언과 초기화 printf("%d\n", age);

1/10, 1/17 파이썬 조건문 (예린, 예원)

Python
10 months ago
#입력하기 var = input() #자료형에 따른 형 변환 ''' 정수 integer int() 실수 float float() 문자열 string str() 리스트 list list() '''

1/10 파이썬 기초(예린, 예원)

Python
10 months ago
''' 자료형 - 정수형 - 실수형 - 문자열 - 리스트 ''' print('안녕하세요') #출력하는 함수 #변수: 자료형들을 저장하는 공간

1/10 c언어 프로젝트: 자라나라 머리카락 (시윤, 승우, 승후)

C
10 months ago
#include <stdio.h> #include <stdlib.h> #include <time.h> int main() { srand(time(NULL)); //난수 초기화 int real_t = rand() % 4; //난수 생성, 진짜 발모제 선택하기 (0~3) printf("===자라나라 머리카락 게임===\n"); int cnt_b = 0; //이번 회차의 조합한 약병 int pre_b = 0;

1/10 c언어 문자열 깊게 다루기 (시윤, 승우, 승후)

C
10 months ago
#include <stdio.h> int main() { char c_array[10] = {'c','o','d','i','n','g','\0'}; printf("%s\n", c_array); // \0 널문자를 생각해서 원래 크기보다 1씩 더 크게 설정 for(int i=0;i<10;i++){ printf("%c\n", c_array[i]); }

1/10 c언어 배열 프로젝트 2 (주완, 세현, 준우)

C
10 months ago
#include <stdio.h> #include <stdlib.h> #include <time.h> int main() { //주사위 int dice[10]; srand(time(NULL)); int num[6] = {0, 0, 0, 0, 0, 0};

1/10 c언어 배열 프로젝트 2 (주완, 세현, 준우)

C
10 months ago
#include <stdio.h> #include <stdlib.h> #include <time.h> int main() { //주사위 int dice[10]; srand(time(NULL)); int num[6] = {0, 0, 0, 0, 0, 0};

1/10 c언어 배열 프로젝트 (주완, 세현, 준우)

C
10 months ago
#include <stdio.h> int main() { int height[10]; for(int i=0; i<10; i++){ scanf("%d", &height[i]); } //평균 int sum=0;

1/8 파이썬 성격 맞추기 게임 (민준)

Python
10 months ago
Q1 = input("1. 발표를 할 때 긴장이 되니? (y/n)\n") if Q1 == 'y': Q2 = input("2. 너는 친구들과 잘 지내니? (y/n) \n") if Q2 == 'y': print("당신은 부끄러움 많은 토끼 성격입니다! 🐰") elif Q2 == 'n': print("당신은 툴툴대는 악어 성격입니다! 🐊") else: print("다시 시도하

1/7 파이썬 모듈 (담미, 정윤)

Python
10 months ago
#모듈이란? 프로그램에서 사용할 함수나 변수를 미리 모아둔 패키지 import random #모듈 불러오기 import math print(math.pi) #모듈에 있는 변수를 가져온 것 print(math.ceil(3.1)) #모듈에 있는 함수를 가져온 것 print(random.choice(['a','b','c','d'])) print(random.sample(range(1, 31), 10))

1/5 파이썬 cos pro 3급 문제 연습 (담미)

Python
10 months ago
''' n = int(input()) #n은 리스트의 크기를 의미함 arr = list(map(int, input().split())) #리스트를 입력받는 것 sum = 0 #다 더할 값을 저장하는 변수 # 짝수 위치(인덱스 1, 3, 5...)를 탐색하기 위한 반복문 for i in range(1, n, 2): sum = sum + arr[i]

12/27 c언어 배열, 문자열 배열로 다루기 (시윤, 승우, 승후)

C
10 months ago
#include <stdio.h> int main() { //초기화 안하고 출력한 경우 int arr[10]; for(int i=0;i<10;i++){ printf("%d\n", arr[i]); } //일부 값 초기화하기