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 the first perfect number because 6 = 3 + 2 + 1. The next is 28 = 14 + 7 + 4 + 2 + 1. There are four perfect numbers less than 10,000. Write a program to find all these four numbers.

Answers

Answer 1

i = 1

while i < 10001:

   total = 0

   x = 1

   while x < i:

       if i % x == 0:

           total += x

       x+=1

   if total == i:

       print(str(i)+" is a perfect number")

   i += 1

When you run this code, you'll see that 6, 28, 496, and 8128 are all perfect numbers.


Related Questions

Edhesive 8.7

Use the following initializer list:
w = ["Algorithm", "Logic", "Filter" "Software"
"Network", "Parameters" "Analyze", "Algorithm", "Functionality", "Viruses"]

Write a loop to print the words that start with "A"

Answers

w = ["Algorithm", "Logic", "Filter" "Software"

"Network", "Parameters", "Analyze", "Algorithm", "Functionality", "Viruses"]

for x in w:

   if x[0] == "A":

       print(x)

We check to see if a word begins with "A" and if it does, we print it to the console.

Rachel wants to copy eight rows of data from one spreadsheet to another. She opens the spreadsheet, highlights the appropriate data,
and selects the Copy command from the menu. What should she do next?

O Select the Cut command from the menu.

O Open the new spreadsheet.

O Double-click on the cells that are highlighted.

Select the Paste command from the menu,
Save and Exit

Answers

Answer:

Rachel should open the new spreadsheet first.  Then she can paste the cells she has copied.

Answer:

Explanation:

Rachel should open the new spreadsheet first.  Then she can paste the cells she has copied.

A Document's Format is??

Answers

Answer:

A text or binary file format for storing documents on a storage media, especially for use by computers.

Explanation:

Answer:

The shape, size, design, and arrangement of its physical elements

Explanation:

What prevents someone who randomly picks up your phone from sending money to themselves using a messenger-based payment?

Answers

Answer:

Explanation:

There are various safety features in place to prevent such scenarios from happening. For starters phones usually have a pin code, pattern code, or fingerprint scanner which prevents unauthorized individuals from entering into the phone's services. Assuming that these features have been disabled by the phone's owner, payment applications usually require 2FA verification which requires two forms of approval such as email approval and fingerprint scanner in order for any transactions to go through. Therefore, an unauthorized individual would not have access to such features and would not be able to complete any transactions.

The feature which prevents someone who randomly picks up your phone from sending money to themselves using a messenger-based payment is:

Security features like passwords or authentication codes

In a messenger-based payment system, there exists various safety features which prevents unauthorised use of the system to send money fraudulently. Some of these features include:

PasswordsPersonal Identification Number (PIN)Two factor authentication (2FA)

As a result of this, we can see that these features prevent someone from making unauthorised money transfers.

Read more here:

https://brainly.com/question/19469131

Which of the following is a type of input device?


Speakers


Touchscreen


Monitor


Hard drive

Answers

Answer: Touchscreen

Explanation:

The type of input device is a touchscreen.

The following information should be considered:

It is the device that is applied for providing the data & controlling the signals to the system like keyboards, mouse, touchscreen, etcThe monitor, speakers & hard drive are not considered as the input device.

Therefore we can conclude that the type of input device is a touchscreen.

Learn more about the device here: brainly.com/question/6277363

2.3 Code Practice: Question 1

Answers

Answer:

a=int(input("Enter a numerator: "))

b=int(input("Enter a divisor: "))

quotient=a/b

remainder=a%b

print("Quotient is: " + str(int(quotient)))

print("Remainder is: " + str(int(remainder)))

Explanation:

Hope this helps lovely :)

Answer:

Answer is in explanation

Explanation:

num = int(input("Enter Numerator "))

den = int(input("Enter Denominator "))

one=int(num/den)

two=int(num%den)

print(one + two)

Explain the difference between file and folder (in your own words)

Answers

Answer:

the difference is one is online and one is not

Explanation:

A file is usually what you find online. And a folder is what you put papers into.

HURRY! PLEASE ANSWER! What additional lenses would be most beneficial to add to your collection and why?

Answers

Are you talking about camera lenses? If so every photographer should have the common focql lengths for prime lenses , a wide angle lense especially and a macro lense is great for magnification of subjects

please help! ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎

Answers

I think the answer the the question is C

Question #6
ent
Fill in the Blank
You have defined your player data type.
class player:
life = 3
magic = False
name = "
You created an instance of your player data type and assigned values.
myPlayer = player()
myPlayer.life = myPlayer.life - 1
myPlayer.life = 4
myPlayer.magic = True
myPlayer.name = 'Kris'
What will be the value displayed after this line of code?
print(myPlayer.life)
You will see

Answers

Answer:

The answer is 4

Proof

What is the result when you run the following line of code after a prompt??
>>>print(3 + 11)

Answers

Answer:

The following output is 14

Explanation:

When you print something, python interprets it and spits it out to the console. In this case, python is just interpreting 3 + 11, which equals 14. Thus, making the answer 14.

hope i helped :D

Answer:

14

Explanation:

what are spreadsheets in a excel workbook called? A. pages B. notepads C.graphs D.worksheets

Answers

D. Worksheets
I’m positive this is the correct answer

ALSO PLZZZ HELP :P Suppose you are purchasing a game at a local retail store that comes on DVD. In order to install it on your laptop, what must the laptop have?

A. a keyboard with a separate keypad for the arrow keys

B. an optical drive

C. an internet connection

D. an external monitor

Answers

I think the answer is B: an optical drive
Hope this helps have a great night

Searching a database for a particular record requires an extension.
O True
O False

Answers

Answer:

False

Explanation:

I think it is right, I am not good with a lot of stuff

Answer:

Its True I got it right on ED

Explanation:

if a network security professional wants to connect some computers in the same building without it using a router what type of network is being used

Answers

Answer:

 the MAC addresses of wireless NICs

Explanation:

Answer:

I would probably suggest Peer-to-Peer

Question 2: Did every packet arrive in the correct order? Describe what went wrong and whether your partner was able to read the message. If neither you nor your partner had an issue try sending another message.

Answers

Answer:

No, the packets did not arrive in the right order but the TCP protocol reordered the packets. The transmission took a while, but the message was finally delivered.

Explanation:

Packets are chunks of data from a data source or message transmitted from one computer device to another. Protocols like TCP or transmission control protocol and UDP (user datagram protocol) are used for data transfer, with TCP as the more reliable protocol (it checks for errors, retransmit lost packets, and reorders received packets in the destination device) and slow protocol.

Assignment 4: Evens and Odds
Need help on this

Answers

Answer:

any even number plus 1 is odd

some people believe that one day space travel will be for everyone what do you think.​

Answers

Answer:

It could be true. When we go into the future we see settling on mars. Soon there may be a type of rocket travel for the public to use.

Explanation:

What happens if you create multiple accounts just to get points faster?

Answers

I don’t think it will work sadly. You can probably accumulate points though on your pre existing account. Hope that helps!

When you create multiple accounts just to get points faster, it does not help as the points will be to the individual account and as such it will not be faster but slower.

Can having multiple accounts quickly hurt your points?

If a person has a lot of  accounts, you have to know that it may have negative effect on your score.

Conclusively, Credit scores or point are not influenced by the number of bank accounts or other account that you have in your name and as such having a lot of account will not increase your points.

Learn more about  multiple accounts from

https://brainly.com/question/25787382

HELP PLEASE 50 POINTS

Answers

Answer:

do u know the muffin man

Explanation:

Answer:dk this old anyways

Explanation:tyftp

Can u write a python program with this output

Answers

Answer:

Not exact, but it will help.

Explanation:

do something like this.

       print("""

       this program will help you plan your garden.

       First, we need some information about the dimensions you want.

       """)

       while True:

           try:

               response = int(input("Please enter the side length for your garden (in feet) : "))

           except ValueError:

               print("(!)Please Enter A Number(!)")

               print("")

               continue

           if str(response) == "":

               continue

           else

               length = int(response)

               break

repeat stuff like that up above for the rest, and then you can decide what to do with the variables and how they need to be multiplied for the output. Good luck!

                       

does anyone like five finger death punch

Answers

Yes I do
Ejennsbdbdh

Answer:

I LOVE Five Finger Death Punch

my favorites from them are apologize, blue on black, and wrong side of heaven!

Explanation:

What are the characteristics of a computer that make it different from other devices that hold electricity?

Answers

Answer:

Input, used to interact with, or send data to the computer (mouse, keyboards, etc.)

Output, which provides output to the user from the computer (monitors, printers, etc.)

Storage, which stores data processed by the computer (hard drives, flash drives, etc.)

Explanation:

Input, used to interact with, or send data to the computer (mouse, keyboards, etc.)

Output, which provides output to the user from the computer (monitors, printers, etc.)

Storage, which stores data processed by the computer (hard drives, flash drives, etc.)

Assignment 4: Evens and Odds

Write a program that will ask a user for how many numbers they would like to check. Then, using a for loop, prompt the user for a number, and output if that number is even or odd. Continue doing this as many times as the user indicated. Once the loop ends, output how many even numbers were entered and how many odd numbers were entered.

Hint: For a number to be even, when the number is divided by 2, there should be no remainder - so you will want to use the modulus (%) operator.

Hint: You will need two count variables to keep track of odd and even numbers.

Sample Run 1
How many numbers do you need to check? 5
Enter number: 20
20 is an even number.
Enter number: 33
33 is an odd number.
Enter number: 4
4 is an even number.
Enter number: 77
77 is an odd number.
Enter number: 8
8 is an even number.
You entered 3 even number(s).
You entered 2 odd number(s).
Sample Run 2
How many numbers do you need to check? 3
Enter number: 10
10 is an even number.
Enter number: 3
3 is an odd number.
Enter number: 400
You entered 2 even number(s).
You entered 1 odd number(s).

Benchmarks
Prompt the user to answer the question, “How many numbers do you need to check? “
Create and initialize two count variables - one for odd and one for even.
Based on the previous input, create a for loop that will run that exact number of times.
Prompt the user to “Enter number: “
If that number is even, output “[number] is an even number.”
Update the even count variable.
Or else if the number is odd, output “[number] is an odd number.”
Update the odd count variable.
Output “You entered [number] even number(s).”
Output “You entered [number] odd number(s).”

Answers

n = int(input("How many numbers do you need to check? "))

odd = 0

even = 0

i = 0

while i < n:

   num = int(input("Enter number: "))

   if num % 2 == 0:

       even += 1

       print(str(num)+" is an even number")

   else:

       odd += 1

       print(str(num)+" is an odd number")

   i += 1

print("You entered "+str(even)+" even number(s).")

print("You entered "+str(odd)+" odd number(s).")

I hope this helps!

The program allows user to enter a specified number of values and displays if the number is even or odd ; The program written in python 3 goes thus :

num_inputs = int(input('number of inputs : '))

#prompts user to enter a specified Number of inputs

count = 1

#keeps of the number of inputs supplied

while count <= num_inputs :

#iterate using a while loop

your_num = int(input('Enter a number : '))

#prompts user to enter an integer value

count+=1

#increase counter by 1

if your_num%2 == 0 :

#checks if number is even

print('even number')

else:

print('odd number')

A sample run of the progam is attached below.

Learn more :https://brainly.com/question/20720413

Please answer my question y'all!

Answers

Answer:

Explanation:1000 mp3s

Answer: It would be 50 MP3s

Explanation: 1000MB equals 1GB. 50 X 20 = 1000.

network does not provide security to us​

Answers

Answer:

May this answer be helpful for you

Explanation:

1.False.

1.False. 2.Network security has many policies which ensure the secure surfing of the internet.

1.False. 2.Network security has many policies which ensure the secure surfing of the internet. 3.The policies do not allow unauthorized access. 4.Thus, network does provide security to us.

If like dog get point..

Answers

I like dogs.

I have got one named Snupy.

Answer: Husky’s just saying..They are pretty animals.

Explanation:

Which is more compact?

- Binary
- ASCII decimal
- Hexadecimal
- BASE64

WHY?

Answers

Answer:

ASCII85 is the most efficient coding system – data size increases by just 20%. It has a couple of minor disadvantages. It uses a larger character set, and so it is only compatible with ASCII (unlike Base64, which supports various close relatives of ASCII). It is also slightly more demanding computationally, since it uses division rather than bit shifting. However, these factors are becoming increasingly irrelevant in the context of modern computer systems. The main reason that Base64 continues to be used more than ASCII85 is probably the simple fact that it has been around for longer.

Explanation:

A tornado destroyed many
CORRECT ANSWER GETS BRAINLIEST PLEASE HELP !
structures in a small Texas
town. Which type of engineer should be called in to collect
evidence in order to prevent this level of damage in the future?
A.chemical engineer
B.biomedical engineer
C.materials engineer
D.forensic engineer

Answers

Answer:

D is your answer because I'm an expert

Answer:

D. forensic engineer

Explanation:

Because I know the answer I got it right

full form of DMBM

plz.. give me answer.....​

Answers

Explanation:

database management system

nice to help .... but I think it is a computer ans

Other Questions
I dont really understand 6th grade history answer number 1 please What is the decimal equivalent of 9 1/2% Answer ASAP Im being timed. The Second Great Awakening resulted in A: increased settlement of the southern part of the state.B: the growth of towns and cities along the coast. C: the growth of a movement to educate all Georgians.D: a revival of interest in Christianity and the growth of churches. drag the tiles to the correct boxes to complete the pairs. match each term to the situation that best describes it How did the south try o counter the North's advantages at sea? You have previously written the introduction and body to your article. Now you will write the conclusion to complete your cause and effect article.Be sure to use the information you previously wrote in your Informational Research Chart, introduction, and body.In your conclusion be sure to:include a conclusion transition phrase.rephrase your thesis.write a clincher.write four or more sentences.Use correct grammar, punctuation, and spelling, and write in formal style using the third person point of view.Add your conclusion to the body and introduction.Save your work to your computer or drive.Submit your work in 02.10 An Excellent Ending.about video games Describe a situation in which you had to weigh the costs and benefits of a decision A soccer ball is kicked at an angle of 40 degrees with an initial velocity of14 m/s. What is the horizontal velocity in m/s? (Do not state units, and giveanswers to the hundredths place.) * FEBDa. Identify at least two pairs of congruent angles in the figure and explain how you know they arecongruent. What postulate or theroem prove these triangles are congruent? Why do archaeologists believe that early peoples crossed Beringia? Choose two answers.DNA evidence shows that American Indians and Siberians are related.American Indian and Siberian languages share similar rules.American Indian and Siberian art share similar patterns.DNA evidence links several American Indian tribes.Siberian tools were used to hunt effectively.PLEASE help i need it thanks Given the mean is 19, find the value of x. -3, 10, 22, x, 28 A person is most likely to be motivated to make an economic decision if:O A.. it requires the person to give up a lot of value in trade-offs.O B. its marginal costs are likely to be greater than its benefits. -O C. it comes with a lot of major opportunity costs.O D. its potential benefits seem to be greater than its costs. can some plz translate my translator isnt workingPourquoi l'lection de Thomas Jefferson comme vice-prsident de John Adams a-t-elle pos problme? R. Jefferson et Adams taient des rivaux politiques. B. Adams voulait Alexander Hamilton comme vice-prsident. C. Jefferson n'tait pas sur le bulletin de vote. D. Jefferson a eu plus de votes lectoraux. Choose the correct answer to 3,979 5.A 795B 795 R4C 794 R9D 796 which of the following is true regarding the solutions to the logarithmic equation below 2log ^6(x)=2 log ^6 (x^2 )=2 x^2=36 x=6,-6 solve for s in the equation please Is tissue a element or compound What information is useful for a virtual tour?