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
  My code works on Jupyter Lab/Notebook, but NOT on Visual Code Editor jst 4 992 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 480 Nov-07-2023, 04:32 PM
Last Post: snippsat
  Something wrong with my code FabianPruitt 5 850 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 1,555 Mar-27-2023, 07:38 AM
Last Post: buran
  Video recording with Raspberry Pi - What´s wrong with my python code? Montezuma1502 3 1,250 Feb-24-2023, 06:14 PM
Last Post: deanhystad
  Why doesn't this code work? What is wrong with path? Melcu54 7 1,781 Jan-29-2023, 06:24 PM
Last Post: Melcu54
  python multiple try except block in my code -- can we shorten code mg24 10 6,100 Nov-10-2022, 12:48 PM
Last Post: DeaD_EyE
  Am I wrong or is Udemy wrong? String Slicing! Mavoz 3 2,539 Nov-05-2022, 11:33 AM
Last Post: Mavoz
  faster code for my code kucingkembar 19 3,222 Aug-09-2022, 09:48 AM
Last Post: DPaul
  Wrong code in Python exercise MaartenRo 2 1,526 Jan-01-2022, 04:12 PM
Last Post: MaartenRo

Forum Jump:

User Panel Messages

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