Rename variables

This commit is contained in:
Craig Richardson 2018-05-15 15:56:39 +01:00
parent 7cd2111639
commit e43369e5ae
2 changed files with 5 additions and 5 deletions

View file

@ -135,7 +135,7 @@ def launch_terminal():
time.sleep(pause)
# type a message a few times
for i in range(3):
for _ in range(3):
layout.write("HELLO FRIEND")
# time.sleep(pause)
kbd.press(Keycode.ENTER)

View file

@ -42,11 +42,11 @@ step_pixel = [9, 8, 7, 6, 5, 4, 3, 2, 9, 8, 7, 6, 5, 4, 3, 2]
step_col = [WHITE, RED, YELLOW, GREEN, AQUA, BLUE, PURPLE, BLACK]
def prog_mode(i):
cpx.play_file(audio_files[i])
step_note[step] = i
def prog_mode(index):
cpx.play_file(audio_files[index])
step_note[step] = index
cpx.pixels[step_pixel[step]] = step_col[step_note[step]]
print("playing file " + audio_files[i])
print("playing file " + audio_files[index])
while True: