Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

in python please - A positive integer is called a perfect number if it is equal to the sum of all of its positive divisors,

in python please

image text in transcribed

- A positive integer is called a perfect number if it is equal to the sum of all of its positive divisors, excluding itself. For example, 6 is perfect number since 6=1+2+3. The next is 28=1+2+4+7+12. There are four perfect numbers less than 10,000 . Write a program that prints all these four numbers. - Your program should have a function called is_perfect that takes as input a positive integers and returns True if it is perfect and False otherwise. - Once you are done. Modify your program so that it looks for all perfect numbers smaller than 35 million. What do you notice? Assuming that you computer can do a billion instructions in a sec, can you figure out how long, roughly, will it take your computer to find 5th perfect number (it is 33,550,336 ). Is the answer roughly: couple of minutes, couple of hours, couple of days, ... weeks, months, years ? - 15 What if you wanted to wait until it prints 6th perfect number, which is 15 8,589,869,056

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

Select Healthcare Classification Systems And Databases

Authors: Katherine S. Rowell, Ann Cutrell

1st Edition

0615909760, 978-0615909769

More Books

Students also viewed these Databases questions

Question

8. How would you explain your decisions to the city council?

Answered: 1 week ago