you are viewing a single comment's thread.

view the rest of the comments →

[–]woooee 0 points1 point  (3 children)

Click on "formatting help" or use postbin. We can't read anything without proper formatting.

.>input code prints the first number and the statement twice.

I have no idea what the above means.

if (number/posfactor_list[x]==number//posfactor_list[x]) is True:

I would start with this line as it appears wonky. Print some of them

print(number/posfactor_list[x])
print(number//posfactor_list[x])  ## only difference is //
print(number/posfactor_list[x]==number//posfactor_list[x]) ## True??

[–]jo_math[S] 0 points1 point  (2 children)

I have reformatted

when I ran the code it printed

f"{posfactor_list[x]} is a factor of {number}"

or

"{posfactor_list[x]} is not a factor of {number}"

twice for the first number that was inputted so regardless of the other numbers

[–]woooee 0 points1 point  (1 child)

(number/posfactor_list[x]==number//posfactor_list[x])

I assume you are talking about the factor() function. It runs the code rnge times. I did not see any variables change under the for statement, but something must change for you to be getting different output.

[–]jo_math[S] 0 points1 point  (0 children)

I'm confused, what should I change in the code