'F' → Fullscreen
Work each one out on paper. Do not run them. Write your answer on your sheet before you move to the next.
Three are C# and three are exam notation. Traces 3 and 4 are the same program in each notation, and so are 5 and 6 — and in each pair the answers are different.
int a = 3;int b = 4;int c = a + b * 2;
Console.WriteLine(c);int total = 0;
for (int i = 1; i <= 4; i++){ if (i % 2 == 0) { total = total + i; }}
Console.WriteLine(total);int boxes = 17;int perCrate = 5;
Console.WriteLine(boxes / perCrate);Trace 3, in exam notation.
boxes ← 17perCrate ← 5
DISPLAY(boxes / perCrate)int[] a = { 1, 2, 3 };int[] b = a;b[0] = 99;
Console.WriteLine(a[0]);Trace 5, in exam notation. If you get the same value for both, reread Activity 1.23.
list ← [1, 2, 3]copy ← listcopy[1] ← 99
DISPLAY(list[1])You should be able to do every one of these without looking anything up. If one is shaky, that is where to spend your review — and Question Set 8's unsure marks are a good place to start.
int, a double, a string, and a bool apartint.Parse or double.Parse, and say what happens when the text is not a numberints gives, and avoid it when you need the decimal:F2if, else if, and else&&, ||, and !Random.Shared.Next(a, b) can givewhile loop and a for loop.Length - 1for loop, and say why its test is <← as assignment and = as equalselse if chain as nested IF and ELSEwhile condition into a REPEAT UNTIL oneREPEAT n TIMES, and walk a list with FOR EACH← copies it/ does not cut off decimals, RANDOM includes both ends, and DISPLAY adds a spaceThe Quarter 1 checkpoint is 40 minutes, on paper, in exam format: sixteen multiple-choice questions, then one written question about a broken program.
Pace yourself. The multiple choice is about 28 minutes, which is exam pace, and the written question gets the rest. If a question is taking too long, mark it, move on, and come back. Leaving one blank to answer three others is the right trade, and it is a skill worth practicing now.
Answer these after the checkpoint, honestly. They are not graded on being flattering.
Submit two things to the dropbox: