I know the basic encoding of strings in Python, but I still can not move forward and complete the whole requirement of the statement. I do not know how to code the quantities you require in the question.
Follow the sentence:
Read keyboard strings until an empty string is read. Type in screen:
-
(A) the number of vowels read;
-
(B) the number of digits read;
- (C) which was the longest string read. If there is a tie, write one;
- (D) the amount of palindromic strings read.
Definition:
A string is said to be palíndrome
if and only if, when read from first to last character is equal to string read from last to first character.
For example:
“AMA”
, “POP”
, “SOCORRAMMESUBINOONIBUSEMMARROCOS”
, “”
, and “Z”
are palindromes.