私はまだPythonになると非常に新しいので、私に簡単になります。私はこのコードをテストするたびに、入力された入力の代わりに "None"が返されます。なぜそれが起こっている可能性がありますか?Python Noob:入力なしとして返す
def inputLandValue():
while(1):
try:
value=int(input('Please enter the value of the property '))
break
except:
print('Please enter a whole number (10000)')
return value
def main():
while(1):
landValue = inputLandValue()
print(landValue)
doMoreStuff = input('Do you want to continue? y/n ')
if(doMoreStuff.lower() != 'y'):
break
main()
input()
私はポケモンの参考資料のためにもう1つの+1をしたいと思います! – Loufylouf