Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Confusing logic
#2
You could rename the started variable to already_started if it makes the code clearer. Also in the 'stop' case, this variable should be set to False, and an error could be written such as 'car already stopped' if the variable is false.
Reply


Messages In This Thread
Confusing logic - by Blob - Nov-17-2019, 07:41 PM
RE: Confusing logic - by Gribouillis - Nov-17-2019, 08:13 PM
RE: Confusing logic - by Blob - Nov-17-2019, 10:57 PM
RE: Confusing logic - by Gribouillis - Nov-17-2019, 11:27 PM
RE: Confusing logic - by Blob - Nov-18-2019, 03:26 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Confusing in [for loop] topic Sherine 11 3,682 Jul-31-2021, 02:53 PM
Last Post: deanhystad
  Confusing output from 2to3 about what files need change Moonwatcher 1 4,860 Dec-30-2018, 04:07 PM
Last Post: Gribouillis
  IndentationError message could be confusing to new programmers insearchofanswers87 1 2,375 May-16-2018, 05:05 PM
Last Post: Larz60+
  Confusing Math DrJu 2 3,283 Jan-18-2018, 10:47 PM
Last Post: Windspar
  Some Confusing Program Errors (Newbie stuff) WildPictus 1 2,817 Sep-03-2017, 05:00 PM
Last Post: hbknjr
  CPU utilisation is confusing Bidgey225 6 5,239 Mar-20-2017, 01:49 PM
Last Post: nilamo

Forum Jump:

User Panel Messages

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