"ANKUR AGGARWAL" wrote
Suppose i am taking input or various variables like
a=raw_input("...") //hello
b=raw_input("")//hi
but i want to run a common function when input is hello
so instead of
if a=="hello":
fun()
then again for b and then again for c then d and so
On Tue, Sep 14, 2010 at 6:45 AM, ANKUR AGGARWAL wrote:
> Suppose i am taking input or various variables like
> a=raw_input("...") //hello
> b=raw_input("")//hi
> c=raw_input("...")//hello
> d=raw_input("..")//hello
> but i want to run a common functi
ANKUR AGGARWAL wrote on 09/13/2010 04:45:41 PM:
> Suppose i am taking input or various variables like
> a=raw_input("...") //hello
> b=raw_input("")//hi
> c=raw_input("...")//hello
> d=raw_input("..")//hello
> but i want to run a common function when
Suppose i am taking input or various variables like
a=raw_input("...") //hello
b=raw_input("")//hi
c=raw_input("...")//hello
d=raw_input("..")//hello
but i want to run a common function when input is hello
so instead of
if a=="hello":
fun()
then aga
Please try and reply to the list instead of just me.
raw_input did not the trick.
fruit.count is the next exercise.
Oke, I deleted the initialazion and change teller into letter.
Roelof
Should be alright now.. Hmmm
Can you paste your exact code AND the error you're getting? As I
understand
On 08/22/2010 09:35 PM, Roelof Wobben wrote:
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
On 8/22/10, Roelof Wobben wrote:
>
> 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("E
On 08/22/2010 09:35 PM, Roelof Wobben wrote:
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
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 (f