Note that your final mark will not be saved in the system.
13. Computational Thinking Typeit
Type the correct answers into the spaces. Fill all the spaces before clicking ‘Check Answers!’
Type the output for each algorithm. If an output is Boolean, i.e. 'true' or 'false', write the output in full rather than writing '0' or '1'.
a = 5
b = 6
c = 4
if (a + b < b + c) then
print(a + c)
else
print(a + c * b)
endif
d = 5
if (d < 5)
d = d + 2
else
if (d > 5)
d = d – 2
endif
endif
print(d)
e = true
f = false
g = false
if (e OR f OR g) then
f = true
elseif (!e OR !f OR !g)
g = true
endif
print(g)
h = true
i = true
if ((h AND !i) OR (!h AND i)) then
print(!h)
else
print(!(!(h))
endif
j = 3
k = 6
m = 9
if (k * 3 == k + j) then
m = m + m * m
else
m = m + m + m
endif
print(m)
p = true
q = false
while (p == q)
if (p == false)
q = true
endif
p = !p
endwhile
print(q)
r = 5
t = true
u = 3
for v = u to r
t = !t
next v
if (t) then
print(r)
else
print(u)
endif
w = true
x = false
y = 1
while (w != x)
w = !w
if y % 2 = 1
x = !x
endif
y = y + 1
endwhile
print(y)