SlideShare a Scribd company logo
Doing math with python.ch01
https://github.com/DevStarSJ/Study/blob/master/Blog/Python/DoingMathWithPython/DoingMathWithPython.Ch01.ipynb
• 원서명 : Doing Math with Python: Use Programming to Explore Algebra,
Statistics, Calculus, More! (ISBN 9781593276409)
• 지은이 : 아미트 사하(Amit Saha)
• 원서 및 관련자료 : https://www.nostarch.com/doingmathwithpython
• 번역서 : http://www.acornpub.co.kr/book/doing-math-with-python
3
4
5
6
 fractions 모듈의 Fraction 클래스를 사용
 Fraction(분자, 분모)로 생성
7
 문자 j 또는 J를 사용하여 허수부 입력
 complex 객체를 이용해서 생성
8
9
10
 분모의 컬레복소수를 분모, 분자에 모두 곱하여 유도
 나머지 % 와 버림은 //은 제공하지 않음
11
 같은 실수부에 허수부의 부호가 반대인 경우
 .conjugate() 멤버함수를 이용
12
 절대치 함수 ( abs() ) 를 이용해서 구할 수 있음
 계산공식 : ( 실수부 제곱 + 허수부 제곱 )의 제곱근 (루트)
13
 0이 아닌 다른 정수 a를 b로 나누었을 때 나머지가 0인 경우 a는 b의 팩터라 함
14
 그보다 작은 모든 양의 정수에 대해서 검사를 수행
15
 센티미터 to 인치 : 1 inch = 2.54 cm
 마일 to 킬로미터 : 1 mile = 1.609 km
 화씨 to 섭씨 : C = (F - 32) * 5 / 9
 섭씨 to 화씨 : F = (C * 9) / 5 + 32
16
 다음 2차 방정식의 근을 구하는 것을 파이썬으로 표현
https://github.com/DevStarSJ/Study/blob/master/Blog/Python/DoingMathWithPython/DoingMathWithPython.Ch01.ipynb
https://www.nostarch.com/doingmathwithpython
18
 입력한 숫자가 짝수인지 홀수인지 출력합니다.
 입력한 숫자 다음으로 오는 짝수 또는 홀수를 같이 출력합니다.
 is_integer()를 이용하여 유효하지 않은 입력에 대해서는 오류 메세지를 출력하세요.
19
20
 아래 변환이 모두 가능한 프로그램을 작성하세요.
 거리(킬로미터 <-> 마일)
 무게(킬로그램 <-> 파운드)
 온도(섭씨 <-> 화시)
21
 2개의 분수를 입력받아서, 사칙연산을 수행하는 프로그램을 작성하세요.
Doing math with python.ch01

More Related Content

PPTX
Doing math with python.ch04
PPTX
Doing math with python.ch03
PPTX
Doing math with python.ch07
PPTX
Doing math with python.ch05
PPTX
Doing mathwithpython.ch02
PDF
PDF
5 python기초 모듈
PDF
6.algorithm chains and piplines
Doing math with python.ch04
Doing math with python.ch03
Doing math with python.ch07
Doing math with python.ch05
Doing mathwithpython.ch02
5 python기초 모듈
6.algorithm chains and piplines

What's hot (7)

PDF
[Algorithm] Big O Notation
PPTX
모바일 해커톤 사전교육 3일차
PPTX
Doing math with python.ch06
PDF
A tour of go
PPTX
1. alps c&c++
PDF
1.introduction
PDF
07 3 이중for문
[Algorithm] Big O Notation
모바일 해커톤 사전교육 3일차
Doing math with python.ch06
A tour of go
1. alps c&c++
1.introduction
07 3 이중for문
Ad

Viewers also liked (14)

DOC
PPTX
Unit 2. at the pet shop.
PDF
PRINCE2 Practitioner Certificate in Project Management
ODP
PPTX
Ade Putri PP
PDF
105508108 etapas-de-la-lectura
PDF
Issue 6 NTEU Chapter 164 newsletter
PDF
Moving to G1GC
PPTX
Sleep solution long work hours
DOCX
Inditex Team Case Final
PDF
Letter memorandom of agreement ojt of students
PPTX
Writing styles workshop
PDF
Issue 2 NTEU Chapter 164 newsletter
DOC
Ojt acceptance form
Unit 2. at the pet shop.
PRINCE2 Practitioner Certificate in Project Management
Ade Putri PP
105508108 etapas-de-la-lectura
Issue 6 NTEU Chapter 164 newsletter
Moving to G1GC
Sleep solution long work hours
Inditex Team Case Final
Letter memorandom of agreement ojt of students
Writing styles workshop
Issue 2 NTEU Chapter 164 newsletter
Ojt acceptance form
Ad

Similar to Doing math with python.ch01 (20)

PPTX
python 수학이해하기
PPTX
Python Sympy 모듈 이해하기
PDF
제3장 계산방법에대한 파이썬학습진행방법. 계산을 통해 python programing
PDF
빅데이터자료구조 Python Module Recursion -모듈-순환-최종.pdf
PDF
05 2 자료형수치오류복소수
PDF
1.3장 차수 높은 프로시저(higher order procedure)로 요약하는 방법
PDF
Java Calculator.pdf
PPTX
Ruby - 3rd (수치의 핵심)
PPTX
파이썬 확률과 통계 기초 이해하기
PDF
2019 고려대학교 프로그래밍 경시대회 풀이
PPTX
파이썬 Numpy 선형대수 이해하기
PDF
2012 Dm 04
PDF
[D2 CAMPUS] 2016 한양대학교 프로그래밍 경시대회 문제풀이
PDF
정수론적 알고리즘 - Sogang ICPC Team, 2020 Winter
PDF
[아꿈사] 게임 기초 수학 물리 1,2장
PDF
[D2 CAMPUS] 2016 한양대학교 프로그래밍 경시대회 문제
PPTX
2019 ppc answers
PDF
Coursera Machine Learning으로 기계학습 배우기 : week2
PPTX
[2장] 딥러닝을 위한 파이썬 기초학습 | 수학 통계를 몰라도 이해할 수 있는 쉬운 딥러닝 | 반병현
PPTX
집합
python 수학이해하기
Python Sympy 모듈 이해하기
제3장 계산방법에대한 파이썬학습진행방법. 계산을 통해 python programing
빅데이터자료구조 Python Module Recursion -모듈-순환-최종.pdf
05 2 자료형수치오류복소수
1.3장 차수 높은 프로시저(higher order procedure)로 요약하는 방법
Java Calculator.pdf
Ruby - 3rd (수치의 핵심)
파이썬 확률과 통계 기초 이해하기
2019 고려대학교 프로그래밍 경시대회 풀이
파이썬 Numpy 선형대수 이해하기
2012 Dm 04
[D2 CAMPUS] 2016 한양대학교 프로그래밍 경시대회 문제풀이
정수론적 알고리즘 - Sogang ICPC Team, 2020 Winter
[아꿈사] 게임 기초 수학 물리 1,2장
[D2 CAMPUS] 2016 한양대학교 프로그래밍 경시대회 문제
2019 ppc answers
Coursera Machine Learning으로 기계학습 배우기 : week2
[2장] 딥러닝을 위한 파이썬 기초학습 | 수학 통계를 몰라도 이해할 수 있는 쉬운 딥러닝 | 반병현
집합

More from Seok-joon Yun (20)

PDF
Retrospective.2020 03
PDF
Sprint & Jira
PPTX
Eks.introduce.v2
PDF
Eks.introduce
PDF
AWS DEV DAY SEOUL 2017 Buliding Serverless Web App - 직방 Image Converter
PDF
아파트 시세,어쩌다 머신러닝까지
PPTX
Pro typescript.ch07.Exception, Memory, Performance
PPTX
Pro typescript.ch03.Object Orientation in TypeScript
PDF
C++ Concurrency in Action 9-2 Interrupting threads
PDF
Welcome to Modern C++
PDF
[2015-07-20-윤석준] Oracle 성능 관리 2
PDF
[2015-07-10-윤석준] Oracle 성능 관리 & v$sysstat
PDF
[2015 07-06-윤석준] Oracle 성능 최적화 및 품질 고도화 4
PDF
오렌지6.0 교육자료
PDF
[2015-06-26] Oracle 성능 최적화 및 품질 고도화 3
PDF
[2015-06-19] Oracle 성능 최적화 및 품질 고도화 2
PDF
[2015-06-12] Oracle 성능 최적화 및 품질 고도화 1
PDF
[2015-06-05] Oracle TX Lock
PDF
[KOSSA] C++ Programming - 18th Study - STL #4
PDF
[KOSSA] C++ Programming - 17th Study - STL #3
Retrospective.2020 03
Sprint & Jira
Eks.introduce.v2
Eks.introduce
AWS DEV DAY SEOUL 2017 Buliding Serverless Web App - 직방 Image Converter
아파트 시세,어쩌다 머신러닝까지
Pro typescript.ch07.Exception, Memory, Performance
Pro typescript.ch03.Object Orientation in TypeScript
C++ Concurrency in Action 9-2 Interrupting threads
Welcome to Modern C++
[2015-07-20-윤석준] Oracle 성능 관리 2
[2015-07-10-윤석준] Oracle 성능 관리 & v$sysstat
[2015 07-06-윤석준] Oracle 성능 최적화 및 품질 고도화 4
오렌지6.0 교육자료
[2015-06-26] Oracle 성능 최적화 및 품질 고도화 3
[2015-06-19] Oracle 성능 최적화 및 품질 고도화 2
[2015-06-12] Oracle 성능 최적화 및 품질 고도화 1
[2015-06-05] Oracle TX Lock
[KOSSA] C++ Programming - 18th Study - STL #4
[KOSSA] C++ Programming - 17th Study - STL #3

Doing math with python.ch01