From 28df09d0fad92c8f9610a2a1b293c83b6a000171 Mon Sep 17 00:00:00 2001 From: Stanislav Mykhailenko Date: Fri, 27 Jan 2023 11:53:51 +0200 Subject: [PATCH] Update Lesson 4 Task 1 to use proper variable names --- Lesson_4/task1.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Lesson_4/task1.py b/Lesson_4/task1.py index bfdafa1..f43445a 100644 --- a/Lesson_4/task1.py +++ b/Lesson_4/task1.py @@ -14,8 +14,8 @@ def getValue(checkedValue): return "no" def printList(names, values): - for i in range(len(names)): - print(chr(ord("a") + i) + ") " + names[i] + " " + "[" + getValue(values[i]) + "]") + for number in range(len(names)): + print(chr(ord("a") + number) + ") " + names[number] + " " + "[" + getValue(values[number]) + "]") print("y) Proceed") def writeData(file, name, code): @@ -39,8 +39,8 @@ while True: file_out = open("data.txt", "w") -for i in range(len(data)): - if data[i]: - writeData(file_out, names[i], code[i]) +for number in range(len(data)): + if data[number]: + writeData(file_out, names[number], code[number]) file_out.close()