Title says all. I need to make a code that gives the prime factorization of a number and put them in a (this is important) a list.
KrazyKitsune 0 Light Poster
Recommended Answers
Jump to PostHere is some code to help you, but you need to do some work.
# define your own function that check for prime def isPrime(x): pass def primeFactorization(num): pfactors = [] while True: j = 2 while j < num+1: if num%j==0 and isPrime(j): num = num/j …
All 3 Replies
cghtkh 9 Junior Poster
eceisl 0 Newbie Poster
TrustyTony 888 ex-Moderator Team Colleague Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.