Python Forum
How does the code run? My code wrong?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How does the code run? My code wrong?
#1
[attachment=731]

Referring to the screenshot above, you can see the "print()" was excuted 2 times, although 1 time is expected.
According to the results printed, the second time excution is expected because the first time looks like "candles_scanned = self.candle_begin + self.candles_quantity" wasn't excuted at all.
I'm so confused how this kind of issue happened, and appreciate if anyone can suggest how to get it fixed.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  I am getting an IndentError on my python code in VS Code and i dont know why jcardenas1980 11 5,092 Mar-22-2025, 09:49 AM
Last Post: Pedroski55
  Merge Python code with Micro Python code? adzy 2 1,005 Jul-03-2024, 11:41 AM
Last Post: kkinder
  My code works on Jupyter Lab/Notebook, but NOT on Visual Code Editor jst 4 4,644 Nov-15-2023, 06:56 PM
Last Post: jst
  I have a code which is very simple but still I cannot detect what's wrong with it max22 1 1,316 Nov-07-2023, 04:32 PM
Last Post: snippsat
  Something wrong with my code FabianPruitt 5 2,131 Jul-03-2023, 10:55 PM
Last Post: Pedroski55
  Compiles Python code with no error but giving out no output - what's wrong with it? pythonflea 6 3,317 Mar-27-2023, 07:38 AM
Last Post: buran
  Video recording with Raspberry Pi - What´s wrong with my python code? Montezuma1502 3 2,466 Feb-24-2023, 06:14 PM
Last Post: deanhystad
  Why doesn't this code work? What is wrong with path? Melcu54 7 3,671 Jan-29-2023, 06:24 PM
Last Post: Melcu54
  python multiple try except block in my code -- can we shorten code mg24 10 15,642 Nov-10-2022, 12:48 PM
Last Post: DeaD_EyE
  Am I wrong or is Udemy wrong? String Slicing! Mavoz 3 5,237 Nov-05-2022, 11:33 AM
Last Post: Mavoz

Forum Jump:

User Panel Messages

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