WorksheetWise · Standard · 1097
Tracing algorithms
Work through each question. Show your reasoning where space is provided.
Name: ____________________ · Date: ____________
1. Trace this algorithm. Start x = 3. Repeat 7 times: x ← x + 22. What is the final x?
2. Trace this algorithm. Start x = 14. Repeat 8 times: x ← x + 28. What is the final x?
3. Trace this algorithm. Start x = 7. Repeat 8 times: x ← x + 7. What is the final x?
4. Trace this algorithm. Start x = 10. Repeat 4 times: x ← x + 6. What is the final x?
5. Trace this algorithm. Start x = 27. Repeat 3 times: x ← x + 9. What is the final x?