Cody

# Problem 57. Summing Digits within Text

Solution 36874

Submitted on 10 Feb 2012 by Mike
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

### Test Suite

Test Status Code Input and Output
1   Pass
%% str = '4 and 20 blackbirds baked in a pie'; total = 24; assert(isequal(number_sum(str),total))

2   Pass
%% str = '2 4 6 8 who do we appreciate?'; total = 20; assert(isequal(number_sum(str),total))

3   Pass
%% str = 'He worked at the 7-11 for \$10 an hour'; total = 28; assert(isequal(number_sum(str),total))

4   Pass
%% str = 'that is 6 of one and a half dozen of the other'; total = 6; assert(isequal(number_sum(str),total))
{"ft_lang_label":"__label__en","ft_lang_prob":0.5970652,"math_prob":0.98984873,"size":659,"snap":"2020-24-2020-29","text_gpt3_token_len":208,"char_repetition_ratio":0.13740458,"word_repetition_ratio":0.0,"special_character_ratio":0.36267072,"punctuation_ratio":0.13076924,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9916431,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2020-07-12T21:34:44Z\",\"WARC-Record-ID\":\"<urn:uuid:362d1500-0d88-40b9-b9fd-4ed97b1a0c31>\",\"Content-Length\":\"73958\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:d69e07da-e11f-4b68-bf6d-8cb5c1e58580>\",\"WARC-Concurrent-To\":\"<urn:uuid:882b90a7-afe0-4b1d-b3a5-61b7bf739c23>\",\"WARC-IP-Address\":\"23.223.252.57\",\"WARC-Target-URI\":\"https://de.mathworks.com/matlabcentral/cody/problems/57-summing-digits-within-text/solutions/36874\",\"WARC-Payload-Digest\":\"sha1:JXEAJO7242JBD4UPRCJRQZJLDKUEZINY\",\"WARC-Block-Digest\":\"sha1:VV7XOBWWVH7UMSFK2HRBZVSKFKWZYHCF\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2020/CC-MAIN-2020-29/CC-MAIN-2020-29_segments_1593657140337.79_warc_CC-MAIN-20200712211314-20200713001314-00387.warc.gz\"}"}