Solving some problems of cosmolgy with Python