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
Answer:
True
Explanation:
An information system is the information and communication technology (ICT) that an organization uses, and also the way in which people interact with this technology in support of business processes. It is an integrated set of components for collecting, storing, and processing data and for providing information, knowledge, and digital products.
Answer:
V44 uses Lempel-Ziv-Welch encoding to compress data.
Explanation:
Lempel–Ziv (LZW) created by Abraham Lempel and Jacob Ziv is a universal lossless data compression algorithm. It is an improvement of LZW algorithm.
It makes use of LZ78 algorithms. This algorithm achieve its compression by taking out repeated occurrences of data with references to a dictionary that is built based on the data stream it received as input.
Also, its dictionary pre-initialized with all available possible characters and symbols.