add better timing functionality with the datetime library
This commit is contained in:
parent
75514a194f
commit
9075fc3c8d
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user