try: num = int(input("整数を入力して下さい")) print(f"{num}の2乗は{num**2}です!") except ValueError as e: print(type(e), e.args) # プログラム10-11(例外の情報を得る)