(text)
| 1 | responses=["Welcome to SMART CALCULATOR","My Name is Calci","Thanks","Sorry,this is beyond my ability"] |
| 2 | |
| 3 | def extract_numbers_from_text(text): |
| 4 | l=[] |
| 5 | for t in text.split(' '): |
| 6 | try: |
| 7 | l.append(float(t)) |
| 8 | except ValueError: |
| 9 | pass |
| 10 | return(l) |
| 11 | |
| 12 | |
| 13 | def add(a,b): |