A programmer has started to write a program, but it does not work correctly. The program should ask the user, "Do you want to start the data backup?". The user then responds 'y' or 'n'. If the user types 'y', then the computer displays the remaining backup phases from 3 down to 1, followed by "Backup Complete!".
Below is the buggy source code:
b = input()
if b == "y"
for phase in range(3, 0 -1):
print(phase)
print("Backup Complete!"
Amend the code to:
b to a more meaningful namerange function's last parameter, set to -1Do not add any additional functionality.
Practise Edexcel GCSE Computer Science Develop code with exam-style questions for GCSE Computer Science. 57 questions covering Decomposition and abstraction to solve problems, Read, write, analyse and refine programs, Converting algorithms into programs, Techniques for readable, maintainable code, Identifying and correcting program errors, and Evaluating program fitness and efficiency, matched to the Edexcel GCSE Computer Science (1CP2) specification and written in Paper 1 and Paper 2 style. Every question includes a full worked solution and mark scheme, so you can see where marks are awarded rather than just whether you got the answer right.