Python Forum
Hard time with prime factors in the task.
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Hard time with prime factors in the task.
#2
To get the prime factors of a number:
  • Start with factor = 2, and all_factors = []
  • As long a number is evenly divisible by factor, divide number by factor and append factor to all_factors.
  • Increase factor by 1
  • Repeat the last two steps until number == 1.
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures
Reply


Messages In This Thread
RE: Hard time with prime factors in the task. - by ichabod801 - Jan-23-2019, 04:15 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Hard time trying to figure out the difference between two strings carecavoador 2 695 Aug-16-2023, 04:53 PM
Last Post: carecavoador
  count certain task in task manager[solved] kucingkembar 2 1,152 Aug-29-2022, 05:57 PM
Last Post: kucingkembar
  Schedule a task and render/ use the result of the task in any given time klllmmm 2 2,129 May-04-2021, 10:17 AM
Last Post: klllmmm
  How to create a task/import a task(task scheduler) using python Tyrel 7 3,784 Feb-11-2021, 11:45 AM
Last Post: Tyrel
  Having a hard time conceptualizing how to print something MysticLord 6 3,149 Sep-19-2020, 10:43 PM
Last Post: MysticLord
  Having hard time understanding the function self-returning itself twice jagasrik 2 2,519 Aug-15-2020, 08:50 PM
Last Post: deanhystad
  The count variable is giving me a hard time in this code D4isyy 2 1,987 Aug-09-2020, 10:32 PM
Last Post: bowlofred
  Having a hard time combining two parts of code. Coozeki 6 3,117 May-10-2020, 06:50 AM
Last Post: Coozeki
  Hard time trying to have clean MySQL to CSV program PierreSoulier 2 2,805 Jul-20-2018, 07:52 AM
Last Post: PierreSoulier
  How hard is this? Phillips45 0 2,125 Jun-11-2018, 05:49 PM
Last Post: Phillips45

Forum Jump:

User Panel Messages

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