Python Forum
help my python thinks -10 > -1
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
help my python thinks -10 > -1
#1
the for loop is suppose to sort through the list x2 and then put anything that's lower than the value of the number at j on the list x3 at an index one less than j.
I'm stopping it from putting in a number twice by detecting if a number has been put in using the boolean numberDone.
[Image: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...aaaaaa.JPG]
Yoriz write Aug-09-2021, 05:37 AM:
Please post all code, output and errors (in their entirety) between their respective tags. Refer to BBCode help topic on how to post. Use the "Preview Post" button to make sure the code is presented as you expect before hitting the "Post Reply/Thread" button.

Attached Files

Thumbnail(s)
   
Reply
#2
nevermind it was the part where it says x3.insert(j - 1, x2[i]) it should be x3.insert(j, x2[i])
Reply


Forum Jump:

User Panel Messages

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