MCPcopy Create free account
hub / github.com/codemistic/Web-Development / extract_numbers_from_text

Function extract_numbers_from_text

Python Calculator/smart_calci.py:3–10  ·  view source on GitHub ↗
(text)

Source from the content-addressed store, hash-verified

1responses=["Welcome to SMART CALCULATOR","My Name is Calci","Thanks","Sorry,this is beyond my ability"]
2
3def 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
13def add(a,b):

Callers 1

mainFunction · 0.85

Calls 1

appendMethod · 0.45

Tested by

no test coverage detected