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

Function main

Python Calculator/smart_calci.py:55–75  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

53 }
54#----------------------------------------main()--------------------------------------
55def main():
56 print(responses[0],responses[1],sep='\n')
57 while True:
58 print()
59 text=input("Enter some text: ")
60 for word in text.split(' '):
61 if word.upper() in operations.keys():
62 try:
63 l=extract_numbers_from_text(text)
64 r=operations[word.upper()](l[0],l[1])
65 print(r)
66 except:
67 print("Something is wrong,Please retry !!!")
68 finally:
69 break
70
71 elif word.upper() in commands.keys():
72 commands[word.upper()]()
73 break
74 else:
75 sorry()
76if __name__=="__main__":
77 main()
78

Callers 1

smart_calci.pyFile · 0.70

Calls 2

sorryFunction · 0.85

Tested by

no test coverage detected