Python Forum
Optimization problem ( food menu )
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Optimization problem ( food menu )
#4
for those who may be interested in the answer this block of code has to be one level in ( below else ):
if withVal > withoutVal:
            result = (withVal, withToTake + (nextItem,))
        else:
            result = (withoutVal, withoutToTake)
I also had to add comma to avoid some error that I don't understand.
Reply


Messages In This Thread
Optimization problem ( food menu ) - by Truman - Mar-28-2019, 11:23 PM
RE: Optimization problem ( food menu ) - by Yoriz - Mar-28-2019, 11:34 PM
RE: Optimization problem ( food menu ) - by Truman - Mar-30-2019, 11:21 PM
RE: Optimization problem ( food menu ) - by Truman - Apr-01-2019, 09:28 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  [PROBLEM] Removing IDLE from context menu WebSpider 1 493 Sep-28-2023, 03:35 PM
Last Post: deanhystad
  optimization problem for dataframe manipulation fimmu 0 1,483 Aug-31-2020, 06:02 PM
Last Post: fimmu
  Problem in solving optimization problem Ruchika 0 1,590 Jul-27-2020, 05:28 AM
Last Post: Ruchika
  Problem with user defined main menu function stefzeer 3 2,416 Mar-27-2020, 06:12 AM
Last Post: buran
  Help on a program to help with distributing food to the needy teenspirit 39 23,515 Apr-12-2017, 10:44 PM
Last Post: sparkz_alot

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020