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
riadik2000 [5.3K]
2 years ago
11

write a program that computes an integer's checksum. to compute the checksum, break the integer into its constituent

Computers and Technology
1 answer:
Serggg [28]2 years ago
8 0

Using the knowledge in computational language in python it is possible to write a code that computes an integer's checksum.

<h3>Writting the code:</h3>

<em>def checkSum(n):                    # Function definition</em>

<em>    total = 0                       # total variable which returns sum</em>

<em>    c = 0                           # counter variable which count the even position</em>

<em>    while(n!=0):                    # running a loop while n != 0</em>

<em>        r = int(n%10)               #breaking the number into digits</em>

<em>        c=c+1                       # increase counter</em>

<em>        if c%2==0:                  # if counter is even position then double the number </em>

<em>            r = r*2</em>

<em>            while(r!=0):                            # do the process</em>

<em>                total = total + int(r%10)</em>

<em>                r = int(r/10)</em>

<em>            n=int(n/10)    </em>

<em>        else:                       # if counter is odd position then simple add the digit </em>

<em>            total = total + r       # into total</em>

<em>            n=int(n/10)</em>

<em>    return total                    # in the last return the sum of digits</em>

<em># Driver code</em>

<em>n = int(input("Enter Number:"))         # asking user to enter the number </em>

<em>print(checkSum(n))                      # calling the function</em>

See more about python at brainly.com/question/18502436

#SPJ1

You might be interested in
Please help me willgive u brainliest​
diamong [38]

Answer:

fortnite

Explanation:

fortnite battle royale is an online multiplier game

4 0
3 years ago
Which of the following does every font that you choose communicate, either on a conscious or subconscious level?
sergeinik [125]
I believe it is b so I will just leave it at that

3 0
4 years ago
Read 2 more answers
Write an if statement that assigns 0.2 to commission if sales is greater than or equal to 10000.
7nadin3 [17]
If (sales >= 10000)
commission = 0.2;
8 0
2 years ago
You are the system administrator for Precision Accounting Services, which employs 20 accountants and 25 accounting assistants. T
Naddik [55]

What can  be done is to provide the computers with  remote access.

<h3>What is Remote access?</h3>

This involves the use of softwares that enables a single computer to view

or control others from any area.

Adopting this method means all the workers will have access to a

consistent desktop experience no matter which computer they sign in to

for work.

Read more about Remote access here brainly.com/question/26327418

4 0
2 years ago
What electronic appliances at your home / school can be controlled remotely? Name any 4
Paladinen [302]

Answer:

Hi how are you doing today Jasmine

8 0
3 years ago
Other questions:
  • How useful do you find the creation of folders in your computer?
    8·2 answers
  • Find every number from 1 to n (inclusive) that is a palindrome which starts with the digit 3. Do not user a helper function.
    10·1 answer
  • Your friend called and told you that he saw information about the classified XYZ program on the Internet. As a cleared employee
    14·1 answer
  • The picture that graphically represents the items you use in windows is called a/an
    5·1 answer
  • You're the network administrator for a company that has just expanded from one floor to two floors of a large building, and the
    7·1 answer
  • Obtaining the data of a video file from a flash drive is an example of a(n) _________ operation.
    6·1 answer
  • In ____________________ testing, security personnel simulate or perform specific and controlled attacks to compromise or disrupt
    10·1 answer
  • Write a program asks the user for an integer N and then adds up the first N odd integers. For example, if the user asks the sum
    11·1 answer
  • Your motherboard has sockets for 184-pin dimm ram. which type of ram should you install?
    15·1 answer
  • Can you exclude header rows from sort in excel?
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!