J

@juhyun

2주차 과제

Python
1 year ago
print('-----문제 1-----') #연도, 월, 일을 입력받아 #"오늘은 2025년 5월 24일입니다" 와 같은 문장을 출력하세요 #입력은 숫자로 받고, 출력은 f-string으로 만드세요 year = ??? month = ??? day = ??? print(???)

5/24/토 - 출력 함수, 주석 (중등반2)

Python
1 year ago
#print() 출력 함수 print('hello world!') print('안녕') print('하세요') print('hello','world') print("I'm") #설명 print('"hello"')

5/24/토 - 변수와 자료형 (중등반1)

Python
1 year ago
print('----파이썬 기본 자료형----') #1. 숫자형 #정수 int 소수점이 없는 숫자 print(2025) print(type(-5)) #실수 float 소수점이 있는 숫자 print(3.14) print(type(3.14))

5/22/목 - 반복문 break (5~6)

Python
1 year ago
while True: print('계속 반복 중') break #break : 반복문을 강제로 멈추게 하는 명령어 i = 0 while True: print('+') if i == 3: break

5/22/목 - 변수 (지명)

Python
1 year ago
#변수 : 값을 저장하는 상자 #변수 이름 = 값 name = '지명' print(name) number = 1004 print(number) list1 = [5, 6, 7, 8] print(list1)

5/22/목 - 반복문 break (3~4)

Python
1 year ago
i = 1 while i > 0: print(i) break #break : 반복문을 강제로 멈추게 하는 명령어 i = 0 while True: print('*') if i == 3:

5/21/수 - 반복문 break (5~6)

Python
1 year ago
i = 1 while i > 0: print(i) break #break : 반복문을 강제로 멈추게 하는 명령어 i = 0 while True: print('+') if i >= 3:

5/21/수 - 반복문 while (3~4)

Python
1 year ago
#while문 : 조건이 참True인 동안 명령을 계속 반복 ''' 기본형 while 조건: 반복할 명령 ''' i = 3 while i > 0: print(i) i = i - 1

5/20/화 - 반복문 while (5~6)

Python
1 year ago
#while문 : 조건이 참True인 동안 명령을 계속 반복 ''' 기본형 while 조건: 반복할 명령 ''' i = 3 while i > 0: print(i)

5/20/화 - 반복문 while (3~4)

Python
1 year ago
#while문 : 조건이 참True인 동안 명령을 계속 반복 ''' while 조건: 반복할 명령 ''' i = 3 while i > 0: print(i) i = i - 1 print('땡!')

5/19/월 - 반복문 while

Python
1 year ago
#while문 : 조건이 참True인 동안 명령을 계속 반복 ''' 기본형 while 조건: 반복할 명령 ''' i = 3 while i > 0: print(i) i = i - 1

5/19/월 - 리스트 원소 줄 세우기 (현지,정윤 보강)

Python
1 year ago
#점 표기법 : 점.을 이용해서 리스트나 문자열에 연결된 함수를 사용하는 것 #append() 리스트 맨 뒤에 추가 #리스트.append(추가할 원소) a = [1, 2, 3] a.append(4) print(a) #insert() 원하는 곳에 추가 #리스트.insert(추가할 위치, 추가할 원소)

5/19/월 - 반복문for, range함수

Python
1 year ago
''' for문 기본형 - 시퀀스의 길이만큼 반복된다 for 변수 in 시퀀스: 반복할 명령 ''' for i in [1, 2, 3]: print('*') for i in 'abcd': print(i)

1주차 과제

Python
1 year ago
''' 1. 각 자료형의 type을 출력하세요 2025 '2025' [2025] ["2025"] ''' #2. 아래 문장을 수정해서 오류를 해결하세요

5/17/토 - 주석 및 print문, 파이썬 기본 자료형 (중등반1)

Python
1 year ago
print('Hello world!') print('박주현') print('Hello','world!') print('안녕') print('하세요') print("'hello'")

5/15/목 - 반복문for, range함수(5~6)

Python
1 year ago
''' for 변수 in 시퀀스: 반복할 명령 ''' for i in [1, 2, 3]: print('*') for i in 'abcd': print(i)

5/15/목 - range() (3~4)

Python
1 year ago
#range(a,b) : a부터 b미만까지의 자연수를 가진 시퀀스 #숫자가 중요 for i in range(5,10): print(i) #숫자보다 횟수가 중요 for i in range(5): print(i) total = 0

5/14/수 - for,range 정리 (5~6)

Python
1 year ago
#반복문 for : 시퀀스의 길이만큼 반복된다 ''' for 변수 in 시퀀스: 반복할 명령 ''' for i in [1, 2, 'a']: print('#') for i in '가나다': print(i)

5/14/수 - 리스트 원소 줄 세우기(3~4)

Python
1 year ago
#점 표기법 : 점.을 이용해서 리스트나 문자열에 연결된 함수를 사용하는 것 #append() 리스트 맨 뒤에 추가 #리스트.append(추가할 원소) a = [1, 2, 3] a.append(4) print(a) #insert() 원하는 곳에 추가 #리스트.insert(추가할 위치, 추가할 원소)

5/13/화 - 시퀀스2, 반복문for (5~6)

Python
1 year ago
''' 시퀀스 자료형 특징 1. 원소에 순서가 있다 2. 특정 원소를 조회할 수 있다 3. 원소의 길이를 확인할 수 있다 4. 연결 연산을 할 수 있다 5. 반복 연산을 할 수 있다 ''' #4. 연결 연산을 할 수 있다 + print('안녕'+'하세요')