Skip to content

Instantly share code, notes, and snippets.

View harrydrippin's full-sized avatar
๐ŸŽ„
Waiting for Christmas

Seunghwan Hong harrydrippin

๐ŸŽ„
Waiting for Christmas
View GitHub Profile
@harrydrippin
harrydrippin / heroquizz_friend_question.js
Last active June 13, 2017 07:04
"(์นœ๊ตฌ)์˜ ์„ฑ๊ฒฉ์„ ์–ผ๋งˆ๋‚˜ ์ž˜ ์•Œ๊ณ  ์žˆ๋‚˜์š”?" ์ •๋‹ต ๋ถ„์„ ์Šคํฌ๋ฆฝํŠธ
/*
* Heroquizz "(์นœ๊ตฌ)๋ฅผ ์–ผ๋งˆ๋‚˜ ์ž˜ ์•Œ๊ณ  ์žˆ๋‚˜์š”?" ๋ถ„์„ ์Šคํฌ๋ฆฝํŠธ
* @author Seunghwan Hong (@harrydrippin)
*/
/* ์‚ฌ์šฉ ๋ฐฉ๋ฒ•
* 1. ์นœ๊ตฌ ํŽ˜์ด์Šค๋ถ์— ๋งํฌ๋œ "(์ด๋ฆ„)์„ ์–ผ๋งˆ๋‚˜ ์ž˜ ์•Œ๊ณ  ์žˆ๋‚˜์š”?" ๋งํฌ๋ฅผ ํด๋ฆญํ•ฉ๋‹ˆ๋‹ค.
* 2. "์ค€๋น„!" ๋ฒ„ํŠผ์„ ๋ˆ„๋ฅด๊ณ , ๋งŒ์•ฝ ํŽ˜์ด์Šค๋ถ ์ธ์ฆ์„ ์š”๊ตฌํ•˜๋ฉด ์ธ์ฆ์„ ์ง„ํ–‰ํ•ฉ๋‹ˆ๋‹ค.
* 3. 1๋ฒˆ ๋ฌธ์ œ๊ฐ€ ๋œจ๋ฉด ๊ฐœ๋ฐœ์ž ๋„๊ตฌ๋ฅผ ๋„์›๋‹ˆ๋‹ค. (Chrome์—์„œ Ctrl + Shift + I (Mac์—์„œ๋Š” Cmd + Option + I))
* 4. Console, ํ˜น์€ ์ฝ˜์†”์„ ์ฐพ๊ณ  ๊ทธ ํ•˜๋‹จ์— ์•„๋ž˜ ์†Œ์Šค(๋‘˜ ์ค‘ ์•„๋ฌด๊ฑฐ๋‚˜ ๊ดœ์ฐฎ์Œ)๋ฅผ ๋ณต์‚ฌํ•˜์—ฌ ๋„ฃ๊ณ  Enter๋ฅผ ์นฉ๋‹ˆ๋‹ค.
@harrydrippin
harrydrippin / all.py
Last active May 3, 2020 13:15
์ฆ๋ถ„๋ฒ•, ์ด๋ถ„๋ฒ•, ๊ฐ€์œ„์น˜๋ฒ•, Newton-Raphson๋ฒ•, ํ• ์„ ๋ฒ•์˜ Python Code ์ •๋ฆฌ ๋ฐ ์„ค๋ช…
# -*- coding: utf-8 -*-
# ์ˆ˜์น˜ํ•ด์„, ๊น€์ƒ์ฒ  ๊ต์ˆ˜๋‹˜
# 1. Incremental Search, Bisection, False Position,
# Newton-Raphson, Secant Method ์ •๋ฆฌ
# 20163179 ํ™์Šนํ™˜
import numpy as np
import math
from scipy.optimize import fsolve