add better timing functionality with the datetime library

This commit is contained in:
Lukasz M 2022-08-25 12:58:14 +02:00
parent 75514a194f
commit 9075fc3c8d

View File

@ -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