Python Forum
coding help lists, loops, and if statement
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
coding help lists, loops, and if statement
#3
When I was writing that code I thought that divisors were whole numbers that resulted from continues dividing a number by 2. For instance 8. Under my logic, it would have divisors of 4, 2, and 1. Or if I have 18 it would have the divisors of 9. I realize now that is incorrect, however, the issue of my code remains. Under the above logic if I put in 8 into my code I should be getting back [4, 2, 1], however, I am getting back [4, 3, 2, 1].
Reply


Messages In This Thread
RE: coding help lists, loops, and if statement - by ilondire05 - Jul-16-2019, 03:59 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  sort lists of lists with multiple criteria: similar values need to be treated equal stillsen 2 3,341 Mar-20-2019, 08:01 PM
Last Post: stillsen
  Problems with For Loops and Lists Sagramor72 2 2,218 Mar-04-2019, 01:26 PM
Last Post: Sagramor72

Forum Jump:

User Panel Messages

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