-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathpre-test.py
50 lines (40 loc) · 1.6 KB
/
pre-test.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
'''
Read the following statements and tick the box next to the correct answer.
int a = 10
int b = 20
a = b
The new values of a and b are:
[ ] a = 20 b = 0
[ ] a = 20 b = 20
[ ] a = 0 b = 10
[ ] a = 10 b = 10
[ ] a = 30 b = 20
[ ] a = 30 b = 0
[ ] a = 10 b = 30
[ ] a = 0 b = 30
[ ] a = 10 b = 20
[ ] a = 20 b = 10
Consider the following program fragment.
if mark > 80: grade = 'A'
elif mark > 60: grade = 'B'
elif mark > 40: grade = 'C'
else: grade = 'F'
What is the effect of executing this code if the variable
mark has the value -12?
(a) The program will crash.
(b) The program will output an error message.
(c) The variable grade will be undefined.
(d) The program will never terminate.
(e) The variable grade will be assigned the value 'F'.
From http://www.eis.mdx.ac.uk/research/PhDArea/saeed/paper1.pdf:
'Formal logical proofs, and therefore programs – formal logical proofs that particular computations
are possible, expressed in a formal system called a programming language – are
utterly meaningless.
To write a computer program you have to come to terms with this, to accept that whatever you
might want the program to mean, the machine will blindly follow its meaningless rules and come to
some meaningless conclusion. In the test the consistent group showed a pre-acceptance of this fact:
they are capable of seeing mathematical calculation problems in terms of rules, and can follow those
rules wheresoever they may lead. The inconsistent group, on the other hand, looks for meaning
where it is not. The blank group knows that it is looking at meaninglessness, and refuses to deal
with it.'
'''