diff --git a/letter_digit.py b/letter_digit.py index e69de29..bc596fc 100644 --- a/letter_digit.py +++ b/letter_digit.py @@ -0,0 +1,11 @@ +def letterAndDigit(string1): + ch=dg=0 + for c in string1: + if c.isalpha() == True: + ch += 1 + elif c.isdigit() == True: + dg += 1 + else: + pass + return({"LETTERS":ch, "DIGITS":dg}) +print letterAndDigit('world! 234') diff --git a/letter_digit.pyc b/letter_digit.pyc new file mode 100644 index 0000000..ed9007e Binary files /dev/null and b/letter_digit.pyc differ diff --git a/tests/__init__.pyc b/tests/__init__.pyc new file mode 100644 index 0000000..d4bc5f7 Binary files /dev/null and b/tests/__init__.pyc differ diff --git a/tests/test_letterAndDigit.pyc b/tests/test_letterAndDigit.pyc new file mode 100644 index 0000000..9996ce0 Binary files /dev/null and b/tests/test_letterAndDigit.pyc differ