From 9075fc3c8d9fa60b863914d43a26c293e7099bf9 Mon Sep 17 00:00:00 2001 From: Lukasz M Date: Thu, 25 Aug 2022 12:58:14 +0200 Subject: [PATCH] add better timing functionality with the datetime library --- linalg-practice.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/linalg-practice.py b/linalg-practice.py index d8e4288..c4f2e0d 100644 --- a/linalg-practice.py +++ b/linalg-practice.py @@ -1,5 +1,6 @@ import sympy as sp import time +import datetime import random import readline @@ -164,7 +165,7 @@ def practice(t) : # increment count count += 1 # print success message - print("Correct! You have solved", count, "problems in %.2f seconds" %tictoc) + print("Correct! You have solved", count, "problems in", str(datetime.timedelta(seconds=round(tictoc)))) break else : # print failure message