Intro to Computing - What is Computing
This code snippet is meant to organize a list of tasks by priority:
What is the error in this code?
tasks = ["clean", "shop", "study"]
priority = [2, 1, 3]
organized = []
for i in range(len(tasks)):
organized.append(tasks[priority[i]])
print(organized)What is the error in this code?
