<p><br>
On Jan 6, 2013 12:33 PM, "kofi" <<a href="mailto:ghanashirts4sale@gmail.com" target="_blank">ghanashirts4sale@gmail.com</a>> wrote:<br>
><br>
> Using python 3.1, I have written a function called "isEvenDigit"<br>
><br>
> Below is the code for the "isEvenDigit" function:<br>
><br>
> def isEvenDigit():<br>
> ste=input("Please input a single character string: ")<br>
> li=["0","2","4", "6", "8"]<br>
> if ste in li:<br>
> print("True")<br>
> else:<br>
> print("False")<br>
><br>
> I am now trying to write a function that takes a string as an argument and makes several calls to the isEvenDigit function in order to calculate and return the number of even digits in the string.How do i do this please? This is what i have done so far.<br>
><br>
> def isEvenDigit2():<br>
> number = input("Enter a digit: ")</p>
<p>Use a loop and call the function in the body of the loop. In this case, you would use a for loop iterating over number. If you don't know how to use a for loop, I recommend you do the tutorial at <a href="http://docs.python.org/3.3/tutorial/">http://docs.python.org/3.3/tutorial/</a><br>
</p>