[Tutor] input problem

Roelof Wobben rwobben at hotmail.com
Sun Aug 22 20:35:15 CEST 2010


Hello, 

 

I made this programm :

 

def count_letters(n,a):
    count = 0
    for char in n:
        if char == a:
            count += 1
    return count

fruit=""
letter=""
fruit= input("Enter a sort of fruit: ")
teller = input("Enter the character which must be counted: ")
x=count_letters (fruit,letter) 
print "De letter", letter , "komt", x , "maal voor in het woord", fruit

 

The problem is that I can't have the opportuntity for input anything.

I use python 2.7 on a Win7 machine with as editor SPE.

 

Roelof

 
 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20100822/fa9df6d7/attachment.html>


More information about the Tutor mailing list