SyntaxError: “can't assign to function call”

后端 未结 4 1003
误落风尘
误落风尘 2020-11-30 11:33

This line in my program:

invest(initial_amount,top_company(5,year,year+1)) = subsequent_amount

causes me to get this error:



        
4条回答
  •  一向
    一向 (楼主)
    2020-11-30 11:54

    You have done it backwards, it should be:

    amount = invest(amount,top_company(5,year,year+1),year)
    

提交回复
热议问题