Miniconda 설치하기
etc./Install and Setup2024. 8. 12. 17:13Miniconda 설치하기

1. Python Version 확인cmd나 PowerShell에서 Python Version을 확인한다.python 2. Miniconda Installhttps://docs.anaconda.com/miniconda/miniconda-other-installer-links/ Latest Miniconda installer links by Python version — Anaconda documentationLatest Miniconda installer links by Python version This list of Miniconda installers is for all supported versions of Python, separated by operating system. For an arch..

[Python] 데이터와 변수 연습
Study Code/[Basic] Python2024. 5. 19. 00:05[Python] 데이터와 변수 연습

width = float(input('가로 길이: '))height = float(input('세로 길이: '))triangle = width * height /2square = width * heightprint ('-' * 20)print('삼각형 넓이 : %f' % triangle)print('사각형 넓이 : %f' % square)print('삼각형 넓이 : %2f' % triangle)print('사각형 넓이 : %2f' % square)print ('-' * 20)  import mathradius = float(input('반지름(cm) 입력 : '))circleArea = math.pi * radius ** 2circleLenth = 2 * math.pi * radiusprint('원의 넓..

[Python] 함수 연습2
Study Code/[Basic] Python2024. 5. 19. 00:00[Python] 함수 연습2

삼각형, 사각형, 원의 넓이를 반환하는 lambda 함수 만들기  triangleArea = lambda num1, num2: num1 * num2 / 2squareArea = lambda num1, num2 : num1 * num2circleArea = lambda r: r * r * 3.14width = int(input('가로: '))height = int(input('세로: '))radius = int(input('반지름: '))triangle = triangleArea(width, height)square = squareArea(width, height)circle = circleArea(radius)print(f'삼각형 넓이: {triangle}')print(f'사각형 넓이: {square}'..

[Python] 함수 연습1
Study Code/[Basic] Python2024. 5. 18. 23:59[Python] 함수 연습1

calculator() 함수를 선언하고 calculator() 안에 덧셈, 뺄셈, 곱셈, 나눗셈 함수를 선언  def calculator(num1, num2, op): def add(): print(f'sum: {num1 + num2}') def sub(): print(f'sub: {num1 - num2}') def mul(): print(f'mul: {num1 * num2}') def div(): print(f'div: {num1 / num2}') if op == 1: add() elif op == 2: sub() elif op == 3: mul() elif op == 4:..

[Python] 반복문 연습4
Study Code/[Basic] Python2024. 5. 18. 23:46[Python] 반복문 연습4

톱니가 각각 n1개와 n2개의 톱니바퀴가 서로 맞물려 회전할 때,  회전을 시작한 후 처음 맞물린 톱니가 최초로 다시 만나게 될 때까지의 톱니의 수와 각각의 바퀴 회전수를 출력 (단, n2는 n1보다 크다.) > 최소 공배수 문제  gearA_cnt = int(input('GearA 톱니수 입력: '))gearB_cnt = int(input('GearB 톱니수 입력: '))gearA_circle, gearB_circle, num = 0, 0, 0flag = Truewhile flag: if gearA_circle != 0: if gearA_circle != num: gearA_circle += gearA_cnt else: flag = ..

728x90
반응형
image