prog4_23.py

c = 2.998e8
f = float(input("周波数(Hz)は?"))
print(f"波長は{c/f:.3g} mです")

# プログラム4-23(周波数から波長を求める)