일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | ||||
4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 |
- Turbulent
- python3
- regression
- 예제
- Compressible Flow
- 프로젝트오일러
- Navier-Stokes
- programmers
- 디스크 컨트롤러
- Crank-Nicolson
- FTCS
- Python
- 이중우선순위큐
- Fluid Dynamics
- 유체역학
- 프로그래머스
- 파이썬
- heap
- Blasius
- Heat Equation
- Boundary Layers
- 힙
- 통계학
- 회귀
- Finite Difference Method
- Fluids
- projecteuler
- Statistics
- Laminar
- 우선순위큐
- Today
- Total
목록Programming (59)
Sudal's Garage
Question: 215 = 32768 and the sum of its digits is 3 + 2 + 7 + 6 + 8 = 26.What is the sum of the digits of the number 21000?문제:215 = 32768 은 32768 이고, 자릿수를 모두 더하면 3 + 2 + 7 + 6 + 8 = 26 이다.그렇다면 21000의 자릿수를 모두 더한 값은 무엇인가? Solution: print(eval('+'.join(list(str(2 ** 1000))))) eval: 문자열을 바로 compute 해준다 1366
Question: Starting in the top left corner of a 2×2 grid, and only being able to move to the right and down, there are exactly 6 routes to the bottom right corner.How many such routes are there through a 20×20 grid?문제: 2×2 격자가 있을 때, 왼쪽 상단 꼭지점으로부터 시작해서 오른쪽과 아래로만 움직여서 오른쪽 하단 꼭지점까지 가는 경로는 정확히 6개 존재한다.그렇다면 20×20 격자에서는 몇 개의 경로가 존재할까? Solution: 123456from sympy.functions.combinatorial.numbers import nC..
앞서 포스팅한 heatFTCS function을 이용해 시간에 따른 온도변화를 시각적으로 나타내보자 function animate1D 를 구현하자 % U: Matrix created by heatFTCS function % tf: Final time value used in heatFTCS function % L: Length L % speedx: run the animation x speed fast function animate1D(U,tf,L,speedx) [m,n] = size(U); X = linspace(0,L,m); % narrow down the number of column of U since its too slow having too % many data to draw I = 1:rou..
반복자에 관한 함수들이 들어있는 모듈: itertools Source: https://docs.python.org/3.7/library/itertools.html#itertools.groupby 무한 반복자:반복자인수결과예count()start, [step]start, start+step, start+2*step, …count(10) --> 10 11 12 1314 ...cycle()pp0, p1, … plast, p0, p1, …cycle('ABCD') --> A B C DA B C D ...repeat()elem [,n]elem, elem, elem, … endlessly or up to n timesrepeat(10, 3) --> 10 10 10Iterators terminating on the s..
Calendar 모듈은 파이썬에서 달력을 볼 수 있게 해준다. Calendar(n): n년도의 달력을 반환한다. >> print(calendar.calendar(2019)) 2019 January February MarchMo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su 1 2 3 4 5 6 1 2 3 1 2 3 7 8 9 10 11 12 13 4 5 6 7 8 9 10 4 5 6 7 8 9 1014 15 16 17 18 19 20 11 12 13 14 15 16 17 11 12 13 14 15 16 1721 22 23 24 25 26 27 18 19 20 21 22 23 24 18 19 20 21 22 23 2428 29 30 31 25 2..