Programming Python Program With Functions In Reactjs