Python Forum
Listing the factors of a number
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Listing the factors of a number
#3
Being a beginner myself I'll give you the little help I can think of, you might want to document your functions, instead of using a comment line on top with:
#my comment
you could try the docstring which would give you something like this:

def find_factors(integer):
    """ Need a function to find factors of an integer.
    """
    factors = []
Your docstring will show up when people use help().
Reply


Messages In This Thread
Listing the factors of a number - by TitaniumGene - Jul-22-2018, 11:38 PM
RE: Listing the factors of a number - by ichabod801 - Jul-23-2018, 12:46 AM
RE: Listing the factors of a number - by WolfWayfarer - Jul-23-2018, 08:03 AM

Forum Jump:

User Panel Messages

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