7 kyu
Monkey's MATH 01: How many "ZERO"s?
471 of 1,175myjinxin2015
Description:
Gigi is a clever monkey, living in the zoo, his teacher (animal keeper) recently taught him some knowledge of "0".
In Gigi's eyes, "0" is a character contains some circle (maybe one, maybe two).
So, a is a "0",b is a "0",6 is also a "0",and 8 have two "0" ,etc...
Now, write some code to count how many "0"s in the text.
Let us see who is smarter? You ? or monkey?
Input always be a string (including words numbers and symbols),You don't need to verify it, but pay attention to the difference between uppercase and lowercase letters.
Here is a table of characters:
Number of zeros | Characters |
---|---|
1 | abdegopq069DOPQR () <-- A pair of braces as a zero |
2 | %&B8 |
Output will be a number of "0".
Strings
Regular Expressions
Puzzles
Similar Kata:
Stats:
Created | Feb 16, 2016 |
Published | Feb 16, 2016 |
Warriors Trained | 2009 |
Total Skips | 63 |
Total Code Submissions | 7113 |
Total Times Completed | 1175 |
JavaScript Completions | 403 |
Ruby Completions | 56 |
Python Completions | 471 |
C# Completions | 111 |
C++ Completions | 195 |
Total Stars | 20 |
% of votes with a positive feedback rating | 88% of 301 |
Total "Very Satisfied" Votes | 245 |
Total "Somewhat Satisfied" Votes | 40 |
Total "Not Satisfied" Votes | 16 |