0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

【勉強の記録】_2019/7/1

Last updated at Posted at 2019-07-01

勉強内容

◆PyQ
35.例外処理
 ・暗号メッセージを作るプログラムの例外処理をしてみよう

学んだこと

###例外処理

try:
    1.例外の可能性あり
except ValueError:
    2.例外処理
else:
    3.例外が起こらなかったとき
finally:
    4.例外の有無に関わらない

###エラー内容

KeyboardInterrupt  #Ctrl-Cを押したためキーボードの処理が中断されるという例外が発生
ValueError #引数の型はあっているけれど誤った値を取っている場合に発生
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?