Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

write the code in paython the out should be the same as these: 1 . Write a function called sum _ divisors ( ) finds

write the code in paython the out should be the same as these:
1.Write a function called sum_divisors()finds the sum of all the proper factors of an
integer. (Proper factors are all the factors of an integer other than the number, itself.)
Signature:
def sum_divisors(n):
# your code here
return
Examples:
sum_divisors(1)-> output (1 #only 1 divides itself)
sum_divisors(5)-> output (6 #5+1)
sum_divisors(10)-> output (18 #1+2+5+10)
2. Write a function called bigger_mystery() that takes one integer parameter, n, and
determines which mystery function above generates a larger result.
"SAME" if the two results are the same
"ONE" if mystery_sum() generates a larger result
"TWO" if mystery_sum2() generates a larger result
Signature:
def bigger_mystery(n):
# your code here
return
Examples:
bigger_mystery(5)-> output (TWO)
bigger_mystery(20))-> output (ONE)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

How many multiples of 4 are there between 10 and 250?

Answered: 1 week ago