hi everybody!!!
I will really appreciate if somebody could help me....
we are working with c and python and the same time and it gets confusing sometimes...
I need to write a program in python tha will receive a string and it will print only the number in the string and the sum of them...
An example of what it should print...
input: 80,45,34
print: 80+ 45+ 34= 159
input: i have 2 bananas and 3 oranges
print: 1+2+3= 6
this is what i got...
data=""
indice=0
number=""
x=0
y= 2
data = input("Please enter a string\n")
print len(data)
while indice < len(data):
if (data[x]<57 and data[x]>48):
print ("%s", data [x])
count += (int(data[x])) + count
x +=1
y -=1
indice +=1
elif (data[x]>57 and data[x]<48):
if w!=1:
w=1
x +=1
print ("+")
indice +=1
elif w==1:
w=0
indice +=1
else:
print ("=%d", count)
pleasee help!!!!!!!....