Answer:
def sum_digits(number):
total = 0
if 1 <= number <= 999:
while number > 0:
r = int (number % 10)
total +=r
number /= 10
else:
return -1
return total
print(sum_digits(658))
Explanation:
Write a function named sum_digits that takes one parameter, number
Check if the number is between 1 and 999. If it is, create a while loop that iterates until number is greater than 0. Get the last digit of the number using mudulo and add it to the total. Then, divide the number by 10 to move to the next digit. This process will continue until the number is equal to 0.
If the number is not in the given range, return -1, indicating invalid range.
Call the function and print the result
The key would he use to create the digital signature is Mike public key.
<h3>Which key is used to sign messages?</h3>
Digital signatures are known to be used via public key. Here, the person is said to be one who is said to produce or creates the digital signature that uses a private key to encrypt signature-linked data.
The only way to decrypt a data is only with the signer's public key, the key David would use to create the digital signature is Mike public key.
Learn more about public key from
brainly.com/question/17486027
A microprocessor can directly process machine code but most programmers almost never write in it.
C. Machine code
The answer is True there is a keyboard like that here