前提・実現したいこと
失礼します
プログラミングの超初心者です。
pythonのinput関数を参考書通りにやろうとしているのですがうまくいきません。
まだ右も左もわからぬ身であり初歩的な質問で大変申し訳ありません。
発生している問題・エラーメッセージ
python
1a = input("type a numeber:") 2type a numeber:
参考書記載のコード
python
1a = input("type a number:") 2b = input("type another:") 3a = int(a) 4b = int(b) 5try: 6 print(a / b) 7except ZeroDivisionError: 8 print("b cannot be zero.")
試したこと
最初にa = input("type a numeber:")と書くとtype a numeber:が出てくるので次に進めない
Pythonはどのように起動していますか。
正常に起動していると思います。うまく説明できないのでスクリーンショットを添付させていただきます。https://d.kuku.lu/f62079f194
回答1件
あなたの回答
tips
プレビュー