学習環境
- Surface 3 (4G LTE)、Surface 3 タイプ カバー、Surface ペン(端末)
- Windows 10 Pro (OS)
- Nebo(Windows アプリ)
- iPad Pro + Apple Pencil
- MyScript Nebo(iPad アプリ)
- 参考書籍
数学読本〈1〉数・式の計算/方程式/不等式 (松坂 和夫(著)、岩波書店)の第1章(数学はここから始まる-数)、1.3(整数)、最大公約数のある性質の問12-(1)、(2).を取り組んでみる。
コード(Emacs)
Python 3
#!/usr/bin/env python3 from sympy import pprint, gcd print('12.') t = [(255, 315, 5, -4), (288, 639, 20, -9)] for i, (a, b, r, s) in enumerate(t, 1): print(f'({i})') d = gcd(a, b) print(d == a * r + b * s)
入出力結果(Terminal, Jupyter(IPython))
$ ./sample14.py 12. (1) True (2) True $
0 コメント:
コメントを投稿