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]
3 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]3 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
50 POINTS
mars1129 [50]

Answer:

B. Ctrl+H

Explanation:

6 0
4 years ago
Read 2 more answers
If you would like to give another user permissions on your mailbox or to particular folders within your mailbox, which role shou
Darya [45]

Answer:

Delegate

Explanation:

8 0
3 years ago
So I bought a mechanical keyboard with cherry mx red switches. you're called "linear and silent" they are linear but they aren't
Gnom [1K]

Answer:

If the keys were silent in the review, it could have been one of two things. The first thing being, the microphone just wasn't picking up the audio as good and the second being, you could have just got scammed. Would you mind telling me the model of your keyboard so I can do some research. Cherry mx switches are loud because they bottom out on the keyboard. The actual switch itself is very quite. All linear means is that they keystroke is consistent and smooth rather than a Tactile switch which has a bum in the middle of its' stroke. In advertisement, they will lightly press they switch and that catches your attention when in reality whatever you are doing gaming or typing you will be slamming your keys down with a considerable amount of force. If you want a quiter keyboard I would pick a low profile keyboard which means that they keystroke is not as long as a mechanical keyboard which also means that the noise from the key hitting the keyboard will be a lot less loud.

Explanation:

Hopefully that kinda answers your questions.

7 0
3 years ago
Gn to be printed at a commercial printer. Which main ink type's exact color appearance is determined by the printer and requires
satela [25.4K]
Idek frl tho maybe go with your gut
5 0
4 years ago
Based on three scores that the user inputs, display the average of the score and the letter grade that is assigned fort he test
Korolek [52]

I used python function to write the code.

def averageScore(x,y,z):

    s = x + y + z

    avg = s/3

   if avg >= 90:

              return f'Your average test score is {avg} You earned a A.'

    elif avg >=80 and avg < 90 :

                return f'Your average test score is {avg} You earned a B.'

   elif avg >=70 and avg < 80 :

                 return f'Your average test score is {avg} You earned a .C'

      elif avg >=60 and avg < 70 :

                  return f'Your average test score is {avg} You earned a D.'

      else:

                    return f'Your average test score is {avg} You earned a F.'

print(averageScore(98, 90, 80))

Python function is used to write the code where x, y and z are the argument (user inputs) of the function. Then the inputs are summed and the average is gotten and stored with the variable, avg.  

If the average is greater than or equal to 90 the program will give the appropriate score and response(grade). It does the same if the user scored 80 - 89, 70 - 79, 60 - 69 and less than 60.

Finally. the function is called with the user input(argument).

Note the bolded values in the code are keywords in python.

read more: brainly.com/question/14191443?referrer=searchResults

5 0
3 years ago
Other questions:
  • Which term refers to actions that you would typically perform on a computer to revive it if it functions in an unexpected manner
    15·2 answers
  • I don't know the answer and I tried different ones and they not what the book is looking for.
    7·1 answer
  • Which segment of society introduced the grunge look?
    5·2 answers
  • In Revit, BIM provides a variety of model information. Which piece of information is not offered by BIM? Select Answer A) Payrol
    5·1 answer
  • Write a recursive function that returns 1 if an array of size n is in sorted order and 0 otherwise. Note: If array a stores 3, 6
    6·1 answer
  • Choose the correct definition for Conditional Statement A. Affects the sequential flow of control by executing different stateme
    6·2 answers
  • PLEASE I NEED HELP FAST
    8·1 answer
  • Acess labeling windows​
    14·1 answer
  • Individuals and IT professionals have a responsibility to be aware of security threats and the damage they might do.
    7·1 answer
  • It specifies the amount of memory needed to store data.
    7·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!