program takes 2 integers and then finds how many divisors each integer between the original 2 has. then prints out which number has the highest number of divisors.

any help is appreciated. im just starting to learn this stuff

huntin4hitters
0
Newbie Poster

program takes 2 integers and then finds how many divisors each integer between the original 2 has. then prints out which number has the highest number of divisors.

any help is appreciated. im just starting to learn this stuff

Jump to Postwell first of all you need to think out how it should work. So, mathematically how do you find the divisors of a number? Then how would you say that in Python? Effort in effort out around here.

Jump to PostHINT: % is the shows the remainder so:

`>>>2%2 0 >>>9%2 1`

so if a number IN THE RANGE OF 1 AND THE GIVEN NUMBER!!!! had a remainder of 1, would it be a divisor? How about if it had a remainder of 0? Now if we …

JoshuaBurleson
23
Posting Whiz

TrustyTony
commented:
Proper newbie handling, sensei ;)
+13

huntin4hitters
0
Newbie Poster

days later and i am still stuck on this...

i know i need to use % when doing the divisors but the % confuses me. what is the exact purpose of the %

huntin4hitters
0
Newbie Poster

JoshuaBurleson
23
Posting Whiz

HINT: % is the shows the remainder so:

```
>>>2%2
0
>>>9%2
1
```

so if a number IN THE RANGE OF 1 AND THE GIVEN NUMBER!!!! had a remainder of 1, would it be a divisor? How about if it had a remainder of 0? Now if we wanted to just find out the amount of divisors it had how would we do that? HINT#2: This is likely to be the LENgth of something.

Edited
by JoshuaBurleson because:
*
n/a *

woooee
814
Nearly a Posting Maven

You can also use divmod.

```
whole, remain = divmod(11, 3)
print whole, remain
```

TrustyTony
888
pyMod
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, learning, and sharing knowledge.

Broken Link

**You're trying to visit a URL that doesn't currently exist on the web.**
Most likely, a member posted a link a long time ago to a web page that has since been removed.
It's also possible that there was a typo when posting the URL.
We redirect you to this notice instead of stripping out the link to preserve the integrity of the post.