Python Forum
Question about Python Code
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Question about Python Code
#9
So now I'm confuse because I though bubble sort is where you compare ADJACENT elements in a list to see which one is greater, and then swap with each other depending on the two value.

So in this case it's; [3, 2, 5, 7, 6, 8]. So is 7, being the 4th position element in this list, is being temporarily store in the variable "temp", i.e. "aList[i+1] = temp", and 3 is being placed in the 4th position? Based on what you're saying the list would look like aList = [2, 5, 3, 7, 6, 8]. Is this what you're saying?
Reply


Messages In This Thread
Question about Python Code - by Than999 - Nov-04-2019, 06:39 PM
RE: Question about Python Code - by Axel_Erfurt - Nov-04-2019, 07:08 PM
RE: Question about Python Code - by jefsummers - Nov-04-2019, 08:34 PM
RE: Question about Python Code - by Than999 - Nov-04-2019, 10:14 PM
RE: Question about Python Code - by Than999 - Nov-04-2019, 11:36 PM
RE: Question about Python Code - by jefsummers - Nov-05-2019, 02:59 AM
RE: Question about Python Code - by Than999 - Nov-05-2019, 07:02 PM
RE: Question about Python Code - by ichabod801 - Nov-05-2019, 07:10 PM
RE: Question about Python Code - by Than999 - Nov-05-2019, 07:32 PM
RE: Question about Python Code - by jefsummers - Nov-05-2019, 08:30 PM
RE: Question about Python Code - by Than999 - Nov-05-2019, 11:59 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  How to Use Python for solving the following physics question. Python Code required ishahid 8 3,866 Dec-18-2019, 06:59 AM
Last Post: akashraj128

Forum Jump:

User Panel Messages

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