Make a Safe Backup
Python
15 pts
Make a Safe Backup
Abel wants to keep a backup of his task list before adding a new task. But the program below has a bug: the backup changes too!
Fix the line that creates backup so it makes a real copy with copy(). Expected output:
['study', 'cook', 'read', 'sleep'] ['study', 'cook', 'read']
Checklist
- Make
backupa real, separate copy oftasks. - Keep the line that adds
"sleep"totasks. - Make sure
backupstill has only the three original tasks. - Print
tasksand thenbackup.
🔑 Solution
If you view the solution before passing, you earn half points for this exercise. You still need to type it and press Check to finish.
How it works, step by step
Point at a step to highlight its lines. Type the solution yourself and press Check answer to finish.
