subject

Given an alphanumeric string made up of digits and lower case ASCII characters only, find the sum of all the digit characters in the string. The function signature for 'sum Digits' is -

(define sumDigits ...)

1. Constraints -
- Not allowed to use library functions. This means no import statement.
- No loops or list comprehension. The solution must be recursive.
- Do not use length of string in any function.

2. Input to function 'sumDigits -
- An alphanumeric string.

3. Output of function -
-Sum of all the digits in the string.

4. Sample test case
Test case 1
calling sumDigits ab1c2d3e54 outputs 15 = 1 + 2 + 3 + 5 + 4

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 02:00
Aisha has finished working on a word processing document that contains 15 pages. she has added some special elements in the first three pages, page 9 and 10, and page 15 from the document. she wants to print only these pages to see how they look. which option is the correct way to represent (in the print dialog box) the pages that aisha wants to print?
Answers: 3
question
Computers and Technology, 23.06.2019 01:00
Let r be a robotic arm with a fixed base and seven links. the last joint of r is a prismatic joint, the other ones are revolute joints. give a set of parameters that determines a placement of r. what is the dimension of the configuration space resulting from your choice of parameters?
Answers: 3
question
Computers and Technology, 23.06.2019 01:30
1. which of the following is a search engine? a) mozilla firefox b)internet explorer c)google d)safari 2. which of the following statements is true? a) all search engines will provide the same results when you enter the same query. b) all search engines use the same amount of advertisements. c) some search engines are also browsers. d) search engines often provide different results, even when you enter the same query.
Answers: 2
question
Computers and Technology, 23.06.2019 16:10
What is the ooh? a. omaha occupation handbook b. online occupational c. occupations online d. occupational outlook handbook select the best answer from the choices provided
Answers: 3
You know the right answer?
Given an alphanumeric string made up of digits and lower case ASCII characters only, find the sum of...
Questions
question
Mathematics, 18.09.2019 16:30
question
Chemistry, 18.09.2019 16:30
Questions on the website: 13722363