I furite a function called num factors. nun factors should 2 have one parameter, an integer. nun_factors should count 3 Thou many factors the number has and return that count as 4 an integer
I furite a function called num factors. nun factors should
2 have one parameter, an integer. nun_factors should count
3 Thou many factors the number has and return that count as
4 an integer
6 JA number is a factor of another number if it divides
7 #evenly into that number. For example, 3 is a factor of 6.
6 but 4 13 not. As such, all factors will be less than the
9 imimber itself.
11 #Do not count 1 or the number itself in your factor count.
2 "For example, 6 should have 2 factors: 2 and 3. Do not
13 count 1 and 6. You may assume the number will be less than
14 #1000.
15
16
17 #Add Your code here!
18
19
20
I Below are some lines of code that will test your function.
"You can change the value of the veriable(s) to test your
function with different inputs.
25 WIE your function works correctly, this will originally
26 #print: 0, 2, 0, 6, 6, each on their own line.
27 print (num_factors (5] )
26 print [nun_faceora (6) )
25 print (mum_factors (97) )
30 print (num factors(105) ]
31 print (mum_factors [999] ]
32
33
34
135
36
< Previous
Next >
3
x I
W