Answer:
- def calcSum(d):
- sum = 0
- for x in d:
- sum += int(x)
- return sum
-
- digits = input("Please enter your digits: ")
- print(calcSum(digits))
Explanation:
The solution code is written in Python.
Firstly, create a function that take one input digit string (Line 1).
In the function, create a sum variable with initial value 0.
Use a for loop to traverse through each character in the digit string and in the loop use int method to convert each character to integer and add it to sum variable (Line 3-5) and return the sum as output.
Next, use input function to prompt user enter a digit string (Line 7).
Lastly test the function by passing the input digit as argument and print the result (Line 8).
Answer:
That’s highly illegal. You should notify them that it is illegal. And, if they continue, you should notify the legal team. If it continues, you either need to leave the company or notify the proper authorities.
Before the use of technology such as computers, information was documented through papers separated in folders. This was a very long and complicated process as people would have to find information by hand, sorting through countless documents. Now, it is much easier and neater to keep information. It can be as easy as digitally searching for someone's name and the computer will sort through countless documents, finding the one you need almost instantly. It is also much less wasteful and safe, as before computers, the use of paper was the only way to permanently keep information, also making documents vulnerable to being lost or stolen.
Answer:
Bits
Explanation:
The protocol data unit is the representative unit of data in the OSI layer of a network. The OSI system has seven layers.
The physical layer is the first layer of the system and the protocol data unit is represented as bits of data.
Note that the term packet is the PDU for data in the network layer of the OSI network system.