From c50ef58c5a543f8434668c13e4d5f65f6ad0922f Mon Sep 17 00:00:00 2001 From: Neil Gershenfeld <gersh@cba.mit.edu> Date: Fri, 16 Oct 2020 21:14:38 -0400 Subject: [PATCH] wip --- Python/numpi.py | 4 ++-- Python/pi.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Python/numpi.py b/Python/numpi.py index f57f872..38be06a 100644 --- a/Python/numpi.py +++ b/Python/numpi.py @@ -17,5 +17,5 @@ i = arange(1,(NPTS+1),dtype=float64) pi = sum(0.5/((i-0.75)*(i-.25))) end_time = time.time() mflops = NPTS*5.0/(1.0e6*(end_time-start_time)) -print "NPTS = %d, pi = %f"%(NPTS,pi) -print "time = %f, estimated MFlops = %f"%(end_time-start_time,mflops) +print("NPTS = %d, pi = %f"%(NPTS,pi)) +print("time = %f, estimated MFlops = %f"%(end_time-start_time,mflops)) diff --git a/Python/pi.py b/Python/pi.py index b7bc8d6..94052a5 100755 --- a/Python/pi.py +++ b/Python/pi.py @@ -17,6 +17,6 @@ for i in range(1,(NPTS+1)): pi += a/((i-b)*(i-c)) end_time = time.time() mflops = NPTS*5.0/(1.0e6*(end_time-start_time)) -print "NPTS = %d, pi = %f"%(NPTS,pi) -print "time = %f, estimated MFlops = %f"%(end_time-start_time,mflops) +print("NPTS = %d, pi = %f"%(NPTS,pi)) +print("time = %f, estimated MFlops = %f"%(end_time-start_time,mflops)) -- GitLab