Python Forum
Output not following rules set in code.
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Output not following rules set in code.
#3
Ok.

Thank you for the feedback, I think I understand where you're coming from, I just don't know how to implement it.

As for what you say about the 25, the thing is that send to be working. It's the lines if x == 50: that seem to be being ignored.

I originally had those statements as seperated nested if statements

if s != 25:
  if b != 25:
    if c != 25:
And the result from that is no different to the result I'm getting now.

I did also wonder about using

if all (a+b, a+c, a+d) != 25:
But am not sure on the correct format of such a line.

Either way though, side 2 should sum to 50 before the program continues, and it isn't doing.

Oh, and I agree with turning it into functions, I just have no idea how to do it.

Would have edited the last post, but I can't find the bottom - maybe I left it too late to do so
Reply


Messages In This Thread
RE: Output not following rules set in code. - by Escribblings - Apr-24-2019, 01:52 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  problem in output of a snippet code akbarza 2 457 Feb-28-2024, 07:15 PM
Last Post: deanhystad
  I cannot able to see output of this code ted 1 808 Feb-22-2023, 09:43 PM
Last Post: deanhystad
  why I dont get any output from this code William369 2 1,191 Jun-23-2022, 09:18 PM
Last Post: William369
  How can I organize my code according to output that I want ilknurg 1 1,225 Mar-11-2022, 09:24 AM
Last Post: perfringo
  Why this code not getting desired output ? MDRI 2 2,620 Sep-18-2020, 02:11 AM
Last Post: MDRI
  Read excel file to determine the rules abc12345 4 2,765 May-13-2020, 12:59 PM
Last Post: abc12345
  I couldn't understand the output of the below code ravich129 1 1,982 Dec-12-2019, 06:24 AM
Last Post: sandeep_ganga
  Output of Python code hemal07yc 5 4,104 Sep-13-2019, 11:33 AM
Last Post: perfringo
  What will the following code output? dukoolsharma 5 3,361 Dec-15-2018, 06:05 AM
Last Post: HarshaliPatel
  No output for the code to read emails avani9659 6 4,342 Aug-14-2018, 08:30 AM
Last Post: avani9659

Forum Jump:

User Panel Messages

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