Can someone help please?


#1

How do i get every index point instead of just the first point?
can someone tell me how concatenate the two prints next to each other?
I want it to print out "x is the count" on one line...

text = 'HELLO MY NAME IS david. I like to ride bikes. bikes are cool.'
def indexing(x):
print(x.index(" "))
print("1st index location")
indexing(text)

def count_them(x):
print (x.count(" "))
print ("is the count")
count_them(text)


#2

Tell me if this works if not tell me which part this is for along with the whole code you are using.
make 1 print function and put

print x.count + " is the count"


#3

what about the parenthesis?


#4

This didn't work...

def count_them(x):
print (x.count(" ") + ("is the count"))
count_them(text)


#5

I figured it out finally lol
def count_them(x):
y = x.count(" ")
print ( "%s is the count." % (y))
count_them(text)


#6

Iam correct then I click next and it take me to the same question when i write the same answer it says that my answer is wrong, pls help me if you know the answer .

def spam():
eggs = 12
return eggs

print spam()