はさみうちの原理
はさみうちの原理
数列{an},{bn},{cn}について、任意の自然数nに対して、an<=bn<=cnのとき
anとcnの極限値がαであれば、bnは極限値を持ち、その値はαになる。
(sin^2nθ)=(sinnθ)^2 I=[0,1]. なぜなら任意のxに対して、0<=x^2であるから。
osモジュールのos.path.exists関数はファイルの有無を調べる。ファイルがある場合はTrueを返す。
import os
if os.path.exists("ex.txt"):
file = "ex.txt"
f = open(file, "r")
line = f.read()
print(line)
f.close()
else:
print("ファイル無し")