1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
insens350 [35]
3 years ago
7

Write an application that displays every perfect number from 1 through 1,000. A perfect number is one that equals the sum of all

the numbers that divide evenly into it. For example, 6 is perfect because 1, 2, and 3 divide evenly into it, and their sum is 6; however, 12 is not a perfect number because 1, 2, 3, 4, and 6 divide evenly into it, and their sum is greater than 12.
Computers and Technology
1 answer:
matrenka [14]3 years ago
5 0

Answer:

Written in Python

for num in range(1,1001):

    sum=0

    for j in range(1,num+1):

         if num%j==0:

              sum = sum + j

                   if num == sum:

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

Explanation:

This line gets the range from 1 to 1000

for num in range(1,1001):

This line initializes sum to 0 for each number 1 to 1000

    sum=0

This line gets the divisor for each number 1 to 1000

    for j in range(1,num+1):

This following if condition line checks for divisor of each number

<em>          if num%j==0: </em>

<em>               sum = sum + j </em>

The following if condition checks for perfect number

                   if num == sum:

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

You might be interested in
Which represents the hierarchical structure of a Google Analytics account from top to bottom?
zlopas [31]

Answer: (D) Account > Property > View

Explanation:

 The Account > Property > View is the hierarchical structure of the google analytics account and it this hierarchical stricture basically represent from top to the bottom. The google account basically contain two and more properties for structuring the efficient accounts.

The property of the reporting view contain unique ID and it is the combination of digits and account ID. The view property in the analytic account basically used for access, analyzing and customize the data for viewing in proper way.

8 0
2 years ago
Explain steps in creating a main document for from letter. <br>​
Paladinen [302]

Answer:

To create a new database, follow these steps:

1.In the Mail Merge task pane, click Next: Select Recipients.

2.Click Type a new list.

3.Click Create. ...

4.After you type the information for a record, click New Entry to move to the next record. ...

5.In the New Address List dialog box, click OK

4 0
3 years ago
Which layer includes the physical transmission medium (cables or wireless media) that any network must use to send and receive t
Yuliya22 [10]

Answer:

The correct answer to the following question will be "Physical Layer".

Explanation:

  • The lowest layer of the OSI reference model is the physical layer. It's in charge of having to send bits from one desktop to the next.
  • This layer isn't acquainted with the interpretation of the parts and is concerned with setting up a physical wireless connection and sending and receiving signals.
  • This layer relies on aspects of the hardware, such as wires, transmitters, and network interface tokens.

Therefore, it will be the right answer.

4 0
3 years ago
PLS HELP ;CC
icang [17]

Answer:

a

early photographers who were first painters

Explanation:

The Rule of Thirds is a compositional technique which states that image painting, photograph, graphic design should be divided into nine equally proportioned boxes by creating a grid with two vertical and two horizontal lines. The rule of third helps in making the picture more attractive and balanced

The rule of thirds was first used in landscape paintings by painters as early as 1797.

5 0
3 years ago
What is virtual memory?
slega [8]
Not a real memory but it points to physical memory.
3 0
3 years ago
Other questions:
  • Generally speaking, mobile sites are good for acquiring new customers and inspiring new relationships while mobile apps are good
    6·1 answer
  • How can I use the internet/social media to protect my identity?
    14·1 answer
  • What is one of the first power tools you’ll need as electrician
    15·1 answer
  • The reliance on _____ as the design methodology for relational databases is seen as a stumbling block to its use in OLAP systems
    5·1 answer
  • What term describes what an actor breaks when he addresses the audience directly from stage, like in Hamlet’s “to be or not to b
    13·2 answers
  • Define the missing function. licenseNum is created as: (100000 * customID) licenseYear, where customID is a function parameter.
    12·1 answer
  • Huh? translate this please. (jk, I know what it says I just want to test everyone.)
    13·1 answer
  • Ling has configured a delegate for her calendar and would like to ensure that the delegate is aware of their permissions. Which
    13·2 answers
  • computer is an electronic machine that is used for data processing to produce meaningful information explain in statement​
    5·1 answer
  • The underlying color of a slide.
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!