エラーなんですが、何かおかしなエラーが出ます。
a = '20'
b = '4'
print(type(float(a / b)))
このコードを実行したので
TypeError: unsupported operand type(s) for /: 'str' and 'str'
このエラーが出るのはわかりますが、
中盤のエラーはなんでしょうか?
私の別の質問でも同じようなことが起こっています。
何かファイルに問題があるのでしょうか??
python3.7 のファイルにあるんですか??
助けてください
Traceback (most recent call last):
File "/Users/gwoninkenji/.vscode/extensions/ms-python.python-2019.9.34911/pythonFiles/ptvsd_launcher.py", line 43, in <module>
main(ptvsdArgs)
File "/Users/gwoninkenji/.vscode/extensions/ms-python.python-2019.9.34911/pythonFiles/lib/python/ptvsd/main.py", line 432, in main
run()
File "/Users/gwoninkenji/.vscode/extensions/ms-python.python-2019.9.34911/pythonFiles/lib/python/ptvsd/main.py", line 316, in run_file
runpy.run_path(target, run_name='main')
File "/Users/gwoninkenji/anaconda3/envs/py36/lib/python3.7/runpy.py", line 263, in run_path
pkg_name=pkg_name, script_name=fname)
File "/Users/gwoninkenji/anaconda3/envs/py36/lib/python3.7/runpy.py", line 96, in _run_module_code
mod_name, mod_spec, pkg_name, script_name)
File "/Users/gwoninkenji/anaconda3/envs/py36/lib/python3.7/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/Users/gwoninkenji/py_with_Thony/chapter02/datatype_12.py", line 3, in <module>
print(type(float(a / b)))
TypeError: unsupported operand type(s) for /: 'str' and 'str'
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。