a = "chips"
b = "fish"
print(a + " and " + b)
What would be the output of this code if you executed it?
Complete lines 3,4 and 5, so that line 6 outputs “fish and chips”. You must comply with the following rules:
- You are only allowed to use 4 keys on your keyboard: a, b, c and =. You can use these keys as many times as necessary.
- You are not allowed to change lines 1,2 or 6.
A trace table can be used to follow the steps of this algorithm one line of code at a time. This will help evaluate the impact of each steps on the different variables used in the code and on the predicted output of the program.
Complete the trace table below using your amended code to see if it produces the required output!