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
System restore
Explanation
System restore is a recovery feature that helps restore your system to the previous condition or point. Most computers have system restore disks which are an advantage to the users especially when the computer clashes.These disks are very effective when it comes to restoring the system to its initial state.
A programming language is not used to talk from human to human. It is used to talk from a human to a computer. Computers are very dumb compared to us, so they need to be taught or spoken to in simple terms. Asking them something complex is far beyond their understanding, as they cannot learn anything beyond what has already been taught to them. Using print: “Hello, World” is the way to tell them to do stuff way less complex than when we say ‘write the words Hello, World on the screen’. A programming language is also not very easy to create. Talking to a computer in a dumb way reduces the process to make a new language for the computer to understand.