Pythonにて関数を定義したのですが、なぜか数値がstrになってしまいます。
どう解消すればよいのでしょうか?
Python
1 2import numpy as np 3import matplotlib.pyplot as plt 4 5def getLowestTemperature(x,y): 6 # 関数を完成させてください 7 8 z=x-y 9 return z 10 11 12x1=input() 13y1=input() 14z1=getLowestTemperature(x1,y1) 15 16print(z) 17
unsupported operand type(s) for -: 'str' and 'str'
回答3件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。