From 398ef6a7bcdf09457c759019ce5e5ec972a2a05e Mon Sep 17 00:00:00 2001 From: Chompworks <33717818+Chompworks@users.noreply.github.com> Date: Mon, 25 Jun 2018 15:54:34 +0100 Subject: [PATCH] Update 3D_Printed_Guardian_Sword.py got rid of some magic numbers from the code, since range() in python ensures no overlapping --- 3D_Printed_Guardian_Sword/3D_Printed_Guardian_Sword.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/3D_Printed_Guardian_Sword/3D_Printed_Guardian_Sword.py b/3D_Printed_Guardian_Sword/3D_Printed_Guardian_Sword.py index 66153235..b6dbb83c 100644 --- a/3D_Printed_Guardian_Sword/3D_Printed_Guardian_Sword.py +++ b/3D_Printed_Guardian_Sword/3D_Printed_Guardian_Sword.py @@ -31,7 +31,7 @@ while True: # Fill up 84 pixels with blue, # starting with pixel number 14. - for i in range(14, BPIXELS): + for i in range(APIXELS, BPIXELS): # Set Pixels to Orange Color pixels[i] = (0, 250, 200) # This sends the updated pixel color to the hardware. @@ -41,7 +41,7 @@ while True: # Fill up 9 pixels with orange, # starting from pixel number 84. - for i in range(84, CPIXELS): + for i in range(BPIXELS, CPIXELS): # Set Pixels to Orange Color pixels[i] = (250, 50, 0) # This sends the updated pixel color to the hardware.