Cody

# Problem 1036. Cell Counting: How Many Draws?

Solution 2098999

Submitted on 20 Jan 2020
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   Fail
games = {'D','D','A','H','D','H'}; draws = 3; assert(isequal(how_many_draws(games),draws))

Undefined function 'eq' for input arguments of type 'cell'. Error in how_many_draws (line 2) draws = sum(find(games=='D')); Error in Test1 (line 3) assert(isequal(how_many_draws(games),draws))

2   Fail
games = {'D','D'}; draws = 2; assert(isequal(how_many_draws(games),draws))

Undefined function 'eq' for input arguments of type 'cell'. Error in how_many_draws (line 2) draws = sum(find(games=='D')); Error in Test2 (line 3) assert(isequal(how_many_draws(games),draws))

3   Fail
games = {'H','H','A'}; draws = 0; assert(isequal(how_many_draws(games),draws))

Undefined function 'eq' for input arguments of type 'cell'. Error in how_many_draws (line 2) draws = sum(find(games=='D')); Error in Test3 (line 3) assert(isequal(how_many_draws(games),draws))

4   Fail
games = {'D','H','H','A','D','H','H','A','D','H','H','A','D','D'}; draws = 5; assert(isequal(how_many_draws(games),draws))

Undefined function 'eq' for input arguments of type 'cell'. Error in how_many_draws (line 2) draws = sum(find(games=='D')); Error in Test4 (line 3) assert(isequal(how_many_draws(games),draws))

### Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
{"ft_lang_label":"__label__en","ft_lang_prob":0.69265264,"math_prob":0.9729642,"size":641,"snap":"2020-45-2020-50","text_gpt3_token_len":222,"char_repetition_ratio":0.17582418,"word_repetition_ratio":0.0,"special_character_ratio":0.3900156,"punctuation_ratio":0.25179857,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.99801606,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2020-10-27T02:11:32Z\",\"WARC-Record-ID\":\"<urn:uuid:d7393ed5-5461-43f0-8acf-d805cc11f94d>\",\"Content-Length\":\"81481\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:6328fd64-55c2-4374-8e0d-ac31a8c9e394>\",\"WARC-Concurrent-To\":\"<urn:uuid:6a1795ed-5353-4198-9e4f-0efd692f5f41>\",\"WARC-IP-Address\":\"184.24.72.83\",\"WARC-Target-URI\":\"https://au.mathworks.com/matlabcentral/cody/problems/1036-cell-counting-how-many-draws/solutions/2098999\",\"WARC-Payload-Digest\":\"sha1:ZW3Y4RIE7FLKTN5Z5F4PL3C54RWEJINL\",\"WARC-Block-Digest\":\"sha1:T72DPQ6TBZM6ZUNXK6QNWY4TC5QNZMW4\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2020/CC-MAIN-2020-45/CC-MAIN-2020-45_segments_1603107892710.59_warc_CC-MAIN-20201026234045-20201027024045-00288.warc.gz\"}"}