Update Lesson 4 Task 1 to use proper variable names
This commit is contained in:
parent
2a3548933a
commit
28df09d0fa
1 changed files with 5 additions and 5 deletions
|
@ -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()
|
||||
|
|
Reference in a new issue