[Solved]-Python Program Part 2 Num Stats Write Python Module Functions Determine Properties Given I Q37201530
Python Program
Part 2: Num Stats
Write a Python Module with some functions that determineproperties of given integers, and use these functions to collectstatistics about a series of numbers input by the user.
To start, create a python file for your module. Name it asLastNameFirstName_num_stats.py. It will contain the followingfunctions:
# is_odd
# Input: number (int)
# Processing: Test to see if that number is odd
# Output: True if it is odd, False otherwise (boolean)
# is_prime
# Input: number (int)
# Processing: Test to see if that number is prime
# Output: True if it is prime, False otherwise (boolean)
# is_square
# Input: number (int)
# Processing: Test to see if that number is a perfect square.
# Output: True if it is a perfect square, False otherwise(boolean)
# length
# Input: number (int)
# Processing: Count the number of digits in int
# Output: The number of digits in int
Part 3: More Numeric AnalysisNow add three more functions to the num_stats module you created in part 2. These will determine if a given positive integer is EVEN, PERFECT and ABUNDANT. Each of these functions should accept a single integer as an argument and return whether the integer meets the criteria for that classification. Here’s some IPO notation to get you started:# function: is_even# input: a positive integer# processing: determines if the supplied number is even# output: boolean# function: is_perfect# input: a positive integer# processing: determines if the supplied number is perfect. a perfect number# is a number that is equal to the sum of its factors besides itself# (i.e. the number 6 is perfect because 6 = 1 + 2 + 3)# output: boolean# function: is_abundant# input: a positive integer# processing: determines if the supplied number is abundant. an abundant number# is a number that is less than the sum of its factors besides itself# (i.e. the number 12 is abundant because 12 < 1 + 2 + 3 + 4 + 6)# output: booleanNext, write a program that uses the num_stats module. Your program will allow the user to analyze numbers within a given range for numbers that fit various criteria. The program should continue to execute as long as the user wishes to keep going.You must ensure that the user enters only positive integers, and that the end number is larger than the start number.Here’s a sample running of the program:


Note: you will want to write additional “helper” functions foryour program. For example, the options above all require the userto supply a range of numbers to analyze. You can probably write afunction that does this so you don’t have to continually copy andpaste the same code over and over again.
Chart all even, odd, prime, perfect and abundant numbers within a given range. Ready? (Enter Y or y to continue; any other value to quit.) Enter starting number (positive only): -5 Invalid, try again Enter starting number (positive only):5 Enter ending number: 3 Invalid, try again Enter ending number: 100 Perfect Abundant Prime Odd Number Even 10 12 13 14 15 16 17 18 19 20 21 23 24 25 26 27 28 29 30 31 32 34 567890123456789012345678901234567890ー234567890 33334444444444555555555566666666667777777777 0 81 82 83 84 85 86 87 89 90 91 92 93 94 95 96 97 98 100 Chart all even, odd, prime, perfect and abundant numbers within a given range. Ready? (Enter Y or y to continue; any other value to quit.) n Goodbye! Show transcribed image text Chart all even, odd, prime, perfect and abundant numbers within a given range. Ready? (Enter Y or y to continue; any other value to quit.) Enter starting number (positive only): -5 Invalid, try again Enter starting number (positive only):5 Enter ending number: 3 Invalid, try again Enter ending number: 100 Perfect Abundant Prime Odd Number Even 10 12 13 14 15 16 17 18 19 20 21 23 24 25 26 27 28 29 30 31 32 34
567890123456789012345678901234567890ー234567890 33334444444444555555555566666666667777777777 0
81 82 83 84 85 86 87 89 90 91 92 93 94 95 96 97 98 100 Chart all even, odd, prime, perfect and abundant numbers within a given range. Ready? (Enter Y or y to continue; any other value to quit.) n Goodbye!
Expert Answer
Answer to Python Program Part 2: Num Stats Write a Python Module with some functions that determine properties of given integers, … . . .
OR

