2025 QUIZ SERIES #ictfromabc
ishÆ u ysñlï weúßKs /All Rights Reserved ]
Bandaranayake - ictfromabc Ravindu Bandaranayake - ictfromabc Ravindu Bandaranayake - ictfromabc Ravindu Bandaranayake - ictfromabc Ravindu Bandaranayake - ictfromabc Ravindu
Bandaranayake -
Bandaranayake -
ictfromabc
ictfromabc
Information
Ravinduand
Ravindu Bandaranayake - ictfromabc
Ravindu Bandaranayake - ictfromabc
Communication
Bandaranayake Technology
- ictfromabc Ravindu Bandaranayake - ictfromabc Ravindu Bandaranayake - ictfromabc Ravindu
Ravindu Bandaranayake - ictfromabc Ravindu Bandaranayake - ictfromabc Ravindu Bandaranayake - ictfromabc Ravindu
Bandaranayake -
Bandaranayake -
ictfromabc
ictfromabc
f;dr;=
Ravindu r
Ravindu Bandaranayake - ictfromabc
Ravindu Bandaranayake - ictfromabc
e yd ika
Bandaranayake k f
s õok
- ictfromabc ;dla
Ravindu I Kh
Bandaranayake - ictfromabc Ravindu Bandaranayake - ictfromabc Ravindu
Ravindu Bandaranayake - ictfromabc Ravindu Bandaranayake - ictfromabc Ravindu Bandaranayake - ictfromabc Ravindu
eeeeee
2024/10/20
2025 QUIZ NO 260 ictfromabc
Ravindu Bandaranayake
1. Which of the following OS types is designed to prevent downtime or delays in critical applications?
;SrKd;aul fhÿïj, wl%sh ld,h fyda m%udohka je,elaùu i|yd ks¾udKh lr we;af;a my; OS
j¾. w;=ßka l=ulao@
1) Single-user, single-task 2) Multi-user, multi-task 3) Real-time
4) Time-sharing 5) Multi-threading
2. A system has 2 GB of physical memory, and each page is 8 KB in size. If a process needs 256 MB of
memory, how many pages will be required to allocate this process?
moaO;shlg 2 GB fN!;sl u;lhla we;s w;r" iEu msgqjlu m%udKh 8 KB fõ' l%shdj,shlg 256 MB
u;lhla wjYH kï" fuu l%shdj,sh fjka lsÍug msgq lShla wjYH fõo @
1) 32,768 2) 64,000 3) 65,536 4) 128,000 5) 131,072
3. What is the use of the Program counter in a PCB?
PCB ys jevigyka .Klfha Ndú;h l=ulao@
1) It holds a number to identify the process
th l%shdj,sh y÷kd .ekSug wxlhla orhs
2) It tracks the time assigned to the process
th l%shdj,shg mjrd we;s ld,h ksÍlaIKh lrhs
3) It maintains the execution history of all the instructions executed.
th l%shd;aul lrk ,o ish¨u Wmfoia l%shd;aul lsÍfï b;sydih mj;ajdf.k hhs'
4) It points to the address of the next instruction to be fetched for execution.
th l%shd;aul lsÍu i|yd ,nd .; hq;= B<Õ Wmfoia j, ,smskh fj; fhduq lrhs'
5) It manages the resource allocation for input/output operations.
th wdodk$m%;sodk fufyhqï i|yd iïm;a fjka lsÍu l<ukdlrKh lrhs'
4. Which of the following statements correctly distinguishes between an entity and an attribute in a
database context?
o;a; iuqod ikao¾Nhl we;s N=;d¾:hla iy Wm,laIKhla ksjerÈj fjkalr y÷kd .kafka my;
i|yka l=uk m%ldYho@
1) An entity represents a real-world object, while an attribute is a property that describes the entity.
N=;d¾:hla ienE f,dal jia;=jla ksfhdackh lrk w;r" Wm,laIKhla hkq jia;=j úia;r lrk
uq,dx.hls'
2) An entity is always numeric, but attributes can be of any data type.
N=;d¾:hla iEu úgu ixLHd;aul fõ" kuq;a Wm,laIK ´kEu o;a; j¾.hlska úh yel'
3) Entities only exist in relational databases, whereas attributes exist in all types of databases.
N=;d¾: mj;skafka iïnkaO;d o;a; iuqodhka ;=< muKla jk w;r" ish¨ j¾.j, o;a; iuqodhka
;=< Wm,laIK mj;S'
4) Attributes are more important than entities because they store the actual data.
i;H o;a; .nvd lrk ksid N=;d¾: j,g jvd Wm,laIK jeo.;a fõ'
5) Entities describe characteristics of attributes.
N=;d¾: Wm,laIKj, ,laIK úia;r lrhs'
2025 QUIZ SERIES -2- #ictfromabc
5. What will be the output of the following code?
my; fla;fha m%;sodkh l=ula fõo @
for num in range(1):
if num % 2 == 0:
print(f"{num} is even")
else:
print(f"{num} is odd")
1) 0 is even 2) 0 is odd 3) 2 is odd 4) 1 is odd 5) 1 is even
1.(a) Consider the below python code.
my; mhs;ka fla;h i,ld n,kak'
list_a = [2, 4, 6, 8, 10]
list_b = []
for i in range(len(list_a)):
list_b.append(list_a[i] - i)
print("output_1:", list_b)
list_c = []
for value in list_b:
if value % 2 == 0:
list_c.append(value)
else:
list_c.insert(0, value)
print("output_2:", list_c)
(i) What is the purpose of the above Python code?
by; mhs;ka fla;fha wruqK l=ulao@
………………………………………………………………………………………………………………
………………………………………………………………………………………………………………
………………………………………………………………………………………………………………
………………………………………………………………………………………………………………
………………………………………………………………………………………………………………
(ii) What is the output of the above Python code?
by; mhs;ka fla;fha m%;sodkh l=ulao@
………………………………………………………………………………………………………………
………………………………………………………………………………………………………………
(b) Given below is a Python program that calculates the minimum number of different notes and coins
needed to pay a given amount. The program will use notes and coins like 2000, 1000, 500, 100, 50,
20, 10, 5, 2 and 1.
my; olajd we;af;a § we;s uqo, f.ùug wjYH úúO fkdaÜgq iy ldis wju ixLHdj .Kkh lrk
mhs;ka jevigykls' fuu jevigyk 2000, 1000, 500, 100, 50, 20, 10, 5, 2 iy 1 jeks fkdaÜgq iy
ldis Ndú;d lrkq we;'
2025 QUIZ SERIES -3- #ictfromabc
def find_min_notes_and_coins(amount):
denominations = [2000, 1000, 500, 100, 50, 20, 10, 5, 2, 1]
result = {}
for denom in denominations:
if amount >= denom:
num_notes = amount // denom
amount = amount % denom
result[denom] = num_notes
for denom, count in result.items():
print(f"{denom} : {count} note/coin(s)")
amount = int(input("Enter the amount: "))
find_min_notes_and_coins(amount)
(i) What is the total number of notes and coins required to pay the amount 3897?
3897 uqo, f.ùug wjYH uq¿ fkdaÜgq iy ldis .Kk fldmuKo@
………………………………………………………………………………………………………………
………………………………………………………………………………………………………………
………………………………………………………………………………………………………………
………………………………………………………………………………………………………………
………………………………………………………………………………………………………………
………………………………………………………………………………………………………………
………………………………………………………………………………………………………………
………………………………………………………………………………………………………………
………………………………………………………………………………………………………………
(ii) If we needed to count the number of coins/notes required to pay a given amount. Write down
necessary code lines should be added to the above python code.
wmg § we;s uqo,la f.ùug wjYH ldis$fkdaÜgq ixLHdj .Kka lsÍug wjYH kï, by; mhs;ka fla;hg
tl;= lsrsug wjYH fla; f¾Ldjka ,shd olajkak'
………………………………………………………………………………………………………………
………………………………………………………………………………………………………………
………………………………………………………………………………………………………………
………………………………………………………………………………………………………………
………………………………………………………………………………………………………………
………………………………………………………………………………………………………………
………………………………………………………………………………………………………………
………………………………………………………………………………………………………………
………………………………………………………………………………………………………………
………………………………………………………………………………………………………………
………………………………………………………………………………………………………………
………………………………………………………………………………………………………………
2025 QUIZ SERIES -4- #ictfromabc
(iii) For the amount 3897, what would be the output of the above python code, if we successfully add the
changes mentioned on (ii).
3897 uqo, i|yd" (ii) ys i|yka fjkialï id¾:lj tl;= l<fyd;a" by; mhs;ka fla;fha m%;sodkh
l=ula fõo@
………………………………………………………………………………………………………………
………………………………………………………………………………………………………………
………………………………………………………………………………………………………………
………………………………………………………………………………………………………………
………………………………………………………………………………………………………………
………………………………………………………………………………………………………………
………………………………………………………………………………………………………………
………………………………………………………………………………………………………………
………………………………………………………………………………………………………………
2.(a) A spaceship is set to launch on a deep-space exploration mission based on the following conditions.
wNHjldY hdkhla my; i|yka fldkafoais u; mokïj .eUqre wNHjldY .fõIK fufyhqula Èh;a
lsÍug iQodkï fõ'
1 The spaceship is fully fueled with a special type of quantum fuel. (A)
wNHjldY hdkh ,nkafka úfYaI lafjdkagï bkaOk j¾.hla u.ska iïmQ¾K iïmQ¾Kfhkau mqrjd we;'
2 The spaceship’s trajectory has been aligned with the gravitational field of a nearby planet. (B)
wNHjldY hdkfha .uka m:h wdikak .%yf,dalhl .=re;ajdl¾IK lafIa;%h iuÕ iumd; ùu.
3 The spaceship’s AI system has successfully passed all diagnostic checks. (C)
wNHjldY hdkfha AI moaO;sh ish¨ frda. úksYaph mÍlaIdjka id¾:lj iu;a ùu'
4 The launch window is within optimal solar radiation limits. (D)
Èh;a lsÍfï ljq¿j m%Yia; iQ¾h úlsrK i Sudjka ;=< mej;Su'
The spaceship can be launched if it is fully fueled and either the trajectory has been aligned with the
gravitational field, or the AI system has passed all diagnostic checks, and the launch window is within
optimal solar radiation limits.
wNHjldY hdkh iïmQ¾Kfhkau bkaOk ,nd § we;akï iy .uka m:h .=re;ajdl¾IK lafIa;%h iuÕ
fm<.iajd we;akï fyda AI s moaO;sh ish¨ frda. úksYaph mÍlaIdjka iu;a ù we;akï iy Èh;a
lsÍfï ljq¿j m%Yia; iQ¾h úlsrK iSudjka ;=< ;sfí kï Èh;a l< yelsh'
(i) Draw the truth table for the above scenario considering the spaceship being launched as 1 and not being
launched at 0.
1, wNHjldY hdkh Èh;a lsÍu f,i;a 0, Èh;a fkdlsÍu f,i;a i,ld by; ;;a;ajh i|yd i;H;d
j.=j w¢kak'
(ii) Find the simplest POS expression using a Karnaugh map for this scenario.
ldfkda is;shula Ndú;d lrñka ir,u POS m%ldYkh fidhd .kak'
(iii) Design a logic circuit for the above (ii) POS expression using basic logic gates.
uQ,sl ;d¾lsl oajdr Ndú;fhka by; (ii) POS m%ldYkh i|yd ;d¾lsl mßm:hla ie,iqï lrkak'
(iv) Design a logic circuit for the above (ii) POS expression using only NOR logic gates.
NOR ;d¾lsl oajdr muKla Ndú;fhka by; (ii) POS m%ldYkh i|yd ;d¾lsl mßm:hla ie,iqï
lrkak'
2025 QUIZ SERIES -5- #ictfromabc
(b) Solve the given Boolean expression using Boolean laws.
nQ,Shdkq kS;s fhdod .ksñka my; nQ,Shdkq m%ldYkh iq¿ lrkak'
̅Y + Y
X+X ̅ + (X + Y
̅)X
̅Y
(c)(i) Design the logic circuit of a 3 input XOR gate and write the Boolean expression. Consider P, Q and R as
inputs and Z as the output.
wdodk 3la iys; XOR oajdrhl ;d¾lsl mßm:h ie,iqï lr tys nQ,shdkq m%ldYkh ,shkak' P, Q iy
R wdodk f,i;a Z m%;sodkh f,i;a i,lkak'
(i) Draw the truth table for the circuit in the above question.
by; m%Yakfha mßm:h i|yd i;H;d j.=j w¢kak'
(ii) Design the circuit of the above XOR gate using the basic logic gates.
uQ,sl ;d¾lsl oajdr Ndú;fhka by; XOR oajdrfhys mßm:h ie,iqï lrkak'
(iii) Design the circuit of the above XOR gate only using NAND logic gates.
by; XOR oajdrfhys mßm:h NAND ;d¾lsl oajdr muKla Ndú;fhka ie,iqï lrkak'
⁕⁕⁕