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
scoray [572]
2 years ago
6

Def sum_divisors(n): sum =1 # Return the sum of all divisors of n, not including n x=int(n**0.5) for i in range(2,(x//1)+1): if

n%i==0: sum=sum+i if n%i==0 and n/i!=i: sum=sum+(n/i) return sum print(sum_divisors(0)) # 0 print(sum_divisors(3)) # Should sum of 1 # 1 print(sum_divisors(36)) # Should sum of 1+2+3+4+6+9+12+18 # 55 print(sum_divisors(102)) # Should be sum of 2+3+6+17+34+51 # 114
Computers and Technology
1 answer:
Novosadov [1.4K]2 years ago
6 0

Answer:

This is a python program that counts the number of divisors of a given number and calculates the sum of the divisors.

Explanation:

The first line defines a function "sum_divisors" with an argument "n". The square root of the argument is converted to integer and assigned to the variable "x", then a for loop is used to iterate through the range 2 to the calculated nth number of divisors in the argument.The return keyword returns the sum value.

The function is called with several arguments and printed with the print function.

You might be interested in
Uses of the following button in a keyboard: Prt SC, Home, Shift, Tab, Pg Up.​
creativ13 [48]

Answer:

This Print Screen key is used to take the screenshots of all that is appearing on the screen, and this can then be pasted in paint and saved in some location of the computer.

The Home key takes the cursor from the current position to the top left, or the start of the file.

Shift: There are two shift keys. And they are used to print the character in the capital. And when the caps lock is busy it can be used to print in lower case. It is also used together with arrow keys to select a part of the text.

Tab: This key moves the cursor from the current location to the location which we know as tab stops ( and the very next one).

Pg Up:​ The page up is being used for scrolling up, and the distance to which limit the scrolling will take place depends upon the application you are working on.

Explanation:

Please check the answer.

4 0
2 years ago
Kendall receives an email stating that a leading computer company is giving away free computers, asking her to forward the email
gavmur [86]

Explanation:

Kendall should report the email as scam and delete email instead of forwarding it. She should also run her virus protection software as these kind of emails on the Internet are mostly Fraud and can contain virus so the user should avoid them.

8 0
3 years ago
Mation about which osi layers of connected cisco devices can be verified with the show cdp neighbors comm
fgiga [73]
The show CDP neighbor command operates at the Data link layer (Layer 2)

Cisco Discovery Protocol (CDP) is a proprietary Data Link Layer protocol developed by Cisco Systems. It is used to share information about other directly connected Cisco equipment, such as the operating system version and IP address.

6 0
3 years ago
PLEASE HELP 15 POINTS Emma plans on building a dog house using an algorithm. What will be the final step of the process? a) crea
cupoosta [38]

Answer:

Most likely C

Explanation:

Blueprint is the plan so she makes it 1st.

Building the roof is after the deck.

The deck is after the blueprint.

After it's all done she looks at it and thinks about what went wrong at then end.

If there are no mistakes it's B.

Hope this answers your question :).

6 0
2 years ago
Look at the following code.int x = 7;int *iptr = &x;What will be displayed if you send the expression *iptr to cout ? What h
masha68 [24]

Answer:

The answer to the given question can be given as:

The value of *iptr is 7. and the value of iptr is dynamic.

Explanation:

In the c++ code, it is defined that x is an integer variable that assigns a value which is 7. Then we define a pointer variable that is *iptr. This variable holds an address of the x variable. When we print the value of the iptr variable. if we use the expression *iptr to print value of the pointer variable by cout that is used in c++ for pint values. so the value of the iptr is 7. If we use the expression iptr sent to cout so we show the address of the variable x. In the pointer, it manages the addresses of dynamically allocated so the address of the variable is changed on execution time.

4 0
3 years ago
Other questions:
  • 1. Write a bash script to create 3 files of different size greater than 1700 kb and less than 1800 kb . The 2. Content of the fi
    9·1 answer
  • Select the correct statement(s) regarding digital baseband modulation.
    7·1 answer
  • What action makes RAM on your computer disappear?
    12·2 answers
  • In which type of attack do you get malicious code in links from seemingly reliable websites?
    14·1 answer
  • Write a program that reads a person's first and last names, separated by a space. Then the program outputs last name, comma, fir
    9·1 answer
  • What port is typically reserved and utilized by the Secure Hypertext Transfer Protocol to create a secure connection to a Web se
    13·1 answer
  • Who creates Virus ? virus is not made for what?
    14·2 answers
  • what is musical technology specifically, the origins of its genesis & its importance to the baroque era
    6·1 answer
  • Can someone write this in java? Also, does anyone know how to do Edhesive assignments?
    15·1 answer
  • An administrator has been asked to update a flow that was created as part of a recent update. When the administrator opens the f
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!