Why does my code not return anything

后端 未结 5 1539
终归单人心
终归单人心 2021-01-29 16:28

fairly new to programming and trying to learn Python at the moment. I have this code and I don\'t understand why I don\'t get a return value :(

balance = 3200
an         


        
5条回答
  •  野趣味
    野趣味 (楼主)
    2021-01-29 17:07

    First of all, in your function f you don't have the return statement that you need if you want to check the equality with 0.

    After add the return statement in the f function you have to write the body of your program because you just have two functions but you don't call them to get a result value...

    I understand that your program has to use the bisection function writing

    bisection()
    

提交回复
热议问题