Determine the output from the program in Figure 1 when the user enters the number 5.
Figure 1
1 n = int(input())
2 x = 2
3 y = 1
4 for i in range(1, n):
5 temp = x
6 x = 2 * x + 3 * y
7 y = temp
8 print(x)
298 exam-style questions on AQA GCSE Computer Science Programming concepts. Each one has a worked solution and a mark scheme showing where the marks go.