A-LEVEL AQA COMPUTER SCIENCE
PAPER 2 EXAM WITH ALL SOLUTIONS
Baud hRate h- h hcorrect hanswer-The hmaximum hpossible hnumber hof hsignal hchanges
hthat hcan hoccur hin ha hwire hper hsecond.
Bit hRate h- h hcorrect hanswer-The hnumber hof hbits hthat hcan hbe hsent hdown ha hwire hper
hsecond.
Integer h- h hcorrect hanswer-A hwhole hnumber hthat hcan hbe hpositive, hnegative hor hzero.
Examples: h-3, h0, h7, h2013588.
Natural h(Number) h- h hcorrect hanswer-A hwhole hnumber hthat his heither hpositive hor hzero.
Examples: h0, h1, h2, h100, h67238.
Rational h(Number) h- h hcorrect hanswer-Any hnumber hthat hcan hbe hrepresented has hthe
hfraction h'a/b' hwhere h'a' hand h'b' hare hboth hintegers.
Examples: h-0.2, h4/5, h1, h1/3.
Irrational h(Number) h- h hcorrect hanswer-Any hnumber hthat hcannot hbe hrepresented has ha
hfraction.
Examples: hsquare hroot hof h2, hPI.
,Real h(Number) h- h hcorrect hanswer-Any hnumber hthat hcan heither hbe hrational hor
hirrational.
Boolean h- h hcorrect hanswer-A hvalue hthat his heither htrue hor hfalse.
String h- h hcorrect hanswer-A hseries hof hcharacters.
Array h- h hcorrect hanswer-A hvariable hthat hcan hstore hmultiple hvalues hof hthe hsame hdata
htype.
Example: hStoring hthe hhigh-scores hof ha hgame has hintegers.
Record h- h hcorrect hanswer-A hvariable hthat hcan hstore hmultiple hvalues hthat hcan hhave
hdifferent hdata htypes.
Example: hStoring hdata habout ha hbook; ha hstring hfor hthe htitle, han hinteger hfor hthe hnumber
hof hpages, hetc.
Variable h- h hcorrect hanswer-A hmetaphor hfor hit his hthat his ha hbox hthat hcan hstore ha
hspecific htype hof hitem h(the hdata htype) hand hhas ha hname hassigned hto hit h(the hidentifier).
hIts hvalue hcan hbe hchanged hduring hrun-time hof hthe hprogram.
Constant h- h hcorrect hanswer-A hmetaphor hfor hit his hthat his ha hbox hthat hcan hstore ha
hspecific htype hof hitem h(the hdata htype) hand hhas ha hname hassigned hto hit h(the hidentifier).
hIts hvalue hcannot hbe hchanged hduring hrun-time hof hthe hprogram.
Subroutine h- h hcorrect hanswer-This hcan hbe hbroken hdown hinto hprocedures hand
hfunctions.
Procedure h- h hcorrect hanswer-A hblock hof hcode hthat hperforms ha hspecific htask hthat
hdoes hnot hreturn ha hvalue. hParameters hcan hbe hpassed hinto hit.
Function h- h hcorrect hanswer-A hblock hof hcode hthat hperforms ha hspecific htask hthat
hreturns ha hvalue. hParameters hcan hbe hpassed hinto hit.
Selection h- h hcorrect hanswer-This his hwhen han hif hstatement hor hselect hcase his hused hto,
hfor hexample, hcheck hthe hvalue hof ha hvariable.
Iteration h- h hcorrect hanswer-This his hwhen, hwithin hthe hprogram, hthere his ha hloop.
Definite hIteration h- h hcorrect hanswer-The hnumber hof htimes hthat hthe hprogram hwill hloop
his halready hspecified.
Example: hFor hloop.
Indefinite hIteration h- h hcorrect hanswer-The hnumber hof htimes hthe hprogram hwill hloop his
hunknown.
Example: hDo hloop.
, Nested h(structures) h- h hcorrect hanswer-This his hwhen heither hiterative hor hselective
hstatements hare hput hinside hof heach hother.
Meaningful hIdentifiers h- h hcorrect hanswer-Subroutines, hvariables hand hobjects hshould
hhave hsensible hnames.
Real hDivision h- h hcorrect hanswer-Finds hthe hvalue h(usually has ha hdecimal) hof hone
hnumber hdivided hby hanother.
Integer hDivision h- h hcorrect hanswer-Finds hthe hinteger hpart hof hone hnumber hdivided hby
hanother.
Integer hRemainder h- h hcorrect hanswer-Finds hthe hremainder hof hone hnumber hdivided
hby hanother.
Truncation h- h hcorrect hanswer-Chops hthe hdecimal hpart hoff ha hnumber.
Floor h- h hcorrect hanswer-Rounds ha hnumber hdown hto hthe hnearest hinteger.
Ceiling h- h hcorrect hanswer-Rounds ha hnumber hup hto hthe hnearest hinteger.
AND h- h hcorrect hanswer-Logical hOperation:
Returns htrue honly hwhen hboth hvalues hare htrue.
OR h- h hcorrect hanswer-Logical hOperation:
Returns htrue has hlong has hat hleast hone hof hthe hvalues hare htrue.
XOR h- h hcorrect hanswer-Logical hOperation:
Returns htrue honly hwhen hexactly hone hof hthe htwo hvalues his htrue hand hnot hboth.
NOT h- h hcorrect hanswer-Logical hOperation:
Returns htrue hif hthe hvalue his hfalse hand hreturns hfalse hif hthe hvalue his htrue.
Exception hHandling h- h hcorrect hanswer-When ha htry hcatch his hused hin hthe hprogram hto
hdeal hwith hany herrors hthat hmay hoccur.
ByVal h- h hcorrect hanswer-When ha hvariable his hpassed hinto ha hsubroutine has ha hcopy hso
hits hvalue hwill hnot hbe hchanged.
ByRef h- h hcorrect hanswer-When ha hvariable his hpassed hinto ha hsubroutine has ha
hreference hso hits hvalue hcan hbe hchanged.
Local h(Variable) h- h hcorrect hanswer-A hvariable hthat his hdefined, hfor hexample, hwithin ha
hsubroutine hand hcannot hbe hviewed hor hmodified hfrom houtside hof hthe hblock hof hcode his
hwas hdeclared hin.
Global h(Variable) h- h hcorrect hanswer-A hvariable hthat his hdeclared, husually hat hthe hstart
hof hthe hprogram, hand hcan hbe haccessed hand hmodified hfrom hanywhere hat hall hin hthe
hprogram.
PAPER 2 EXAM WITH ALL SOLUTIONS
Baud hRate h- h hcorrect hanswer-The hmaximum hpossible hnumber hof hsignal hchanges
hthat hcan hoccur hin ha hwire hper hsecond.
Bit hRate h- h hcorrect hanswer-The hnumber hof hbits hthat hcan hbe hsent hdown ha hwire hper
hsecond.
Integer h- h hcorrect hanswer-A hwhole hnumber hthat hcan hbe hpositive, hnegative hor hzero.
Examples: h-3, h0, h7, h2013588.
Natural h(Number) h- h hcorrect hanswer-A hwhole hnumber hthat his heither hpositive hor hzero.
Examples: h0, h1, h2, h100, h67238.
Rational h(Number) h- h hcorrect hanswer-Any hnumber hthat hcan hbe hrepresented has hthe
hfraction h'a/b' hwhere h'a' hand h'b' hare hboth hintegers.
Examples: h-0.2, h4/5, h1, h1/3.
Irrational h(Number) h- h hcorrect hanswer-Any hnumber hthat hcannot hbe hrepresented has ha
hfraction.
Examples: hsquare hroot hof h2, hPI.
,Real h(Number) h- h hcorrect hanswer-Any hnumber hthat hcan heither hbe hrational hor
hirrational.
Boolean h- h hcorrect hanswer-A hvalue hthat his heither htrue hor hfalse.
String h- h hcorrect hanswer-A hseries hof hcharacters.
Array h- h hcorrect hanswer-A hvariable hthat hcan hstore hmultiple hvalues hof hthe hsame hdata
htype.
Example: hStoring hthe hhigh-scores hof ha hgame has hintegers.
Record h- h hcorrect hanswer-A hvariable hthat hcan hstore hmultiple hvalues hthat hcan hhave
hdifferent hdata htypes.
Example: hStoring hdata habout ha hbook; ha hstring hfor hthe htitle, han hinteger hfor hthe hnumber
hof hpages, hetc.
Variable h- h hcorrect hanswer-A hmetaphor hfor hit his hthat his ha hbox hthat hcan hstore ha
hspecific htype hof hitem h(the hdata htype) hand hhas ha hname hassigned hto hit h(the hidentifier).
hIts hvalue hcan hbe hchanged hduring hrun-time hof hthe hprogram.
Constant h- h hcorrect hanswer-A hmetaphor hfor hit his hthat his ha hbox hthat hcan hstore ha
hspecific htype hof hitem h(the hdata htype) hand hhas ha hname hassigned hto hit h(the hidentifier).
hIts hvalue hcannot hbe hchanged hduring hrun-time hof hthe hprogram.
Subroutine h- h hcorrect hanswer-This hcan hbe hbroken hdown hinto hprocedures hand
hfunctions.
Procedure h- h hcorrect hanswer-A hblock hof hcode hthat hperforms ha hspecific htask hthat
hdoes hnot hreturn ha hvalue. hParameters hcan hbe hpassed hinto hit.
Function h- h hcorrect hanswer-A hblock hof hcode hthat hperforms ha hspecific htask hthat
hreturns ha hvalue. hParameters hcan hbe hpassed hinto hit.
Selection h- h hcorrect hanswer-This his hwhen han hif hstatement hor hselect hcase his hused hto,
hfor hexample, hcheck hthe hvalue hof ha hvariable.
Iteration h- h hcorrect hanswer-This his hwhen, hwithin hthe hprogram, hthere his ha hloop.
Definite hIteration h- h hcorrect hanswer-The hnumber hof htimes hthat hthe hprogram hwill hloop
his halready hspecified.
Example: hFor hloop.
Indefinite hIteration h- h hcorrect hanswer-The hnumber hof htimes hthe hprogram hwill hloop his
hunknown.
Example: hDo hloop.
, Nested h(structures) h- h hcorrect hanswer-This his hwhen heither hiterative hor hselective
hstatements hare hput hinside hof heach hother.
Meaningful hIdentifiers h- h hcorrect hanswer-Subroutines, hvariables hand hobjects hshould
hhave hsensible hnames.
Real hDivision h- h hcorrect hanswer-Finds hthe hvalue h(usually has ha hdecimal) hof hone
hnumber hdivided hby hanother.
Integer hDivision h- h hcorrect hanswer-Finds hthe hinteger hpart hof hone hnumber hdivided hby
hanother.
Integer hRemainder h- h hcorrect hanswer-Finds hthe hremainder hof hone hnumber hdivided
hby hanother.
Truncation h- h hcorrect hanswer-Chops hthe hdecimal hpart hoff ha hnumber.
Floor h- h hcorrect hanswer-Rounds ha hnumber hdown hto hthe hnearest hinteger.
Ceiling h- h hcorrect hanswer-Rounds ha hnumber hup hto hthe hnearest hinteger.
AND h- h hcorrect hanswer-Logical hOperation:
Returns htrue honly hwhen hboth hvalues hare htrue.
OR h- h hcorrect hanswer-Logical hOperation:
Returns htrue has hlong has hat hleast hone hof hthe hvalues hare htrue.
XOR h- h hcorrect hanswer-Logical hOperation:
Returns htrue honly hwhen hexactly hone hof hthe htwo hvalues his htrue hand hnot hboth.
NOT h- h hcorrect hanswer-Logical hOperation:
Returns htrue hif hthe hvalue his hfalse hand hreturns hfalse hif hthe hvalue his htrue.
Exception hHandling h- h hcorrect hanswer-When ha htry hcatch his hused hin hthe hprogram hto
hdeal hwith hany herrors hthat hmay hoccur.
ByVal h- h hcorrect hanswer-When ha hvariable his hpassed hinto ha hsubroutine has ha hcopy hso
hits hvalue hwill hnot hbe hchanged.
ByRef h- h hcorrect hanswer-When ha hvariable his hpassed hinto ha hsubroutine has ha
hreference hso hits hvalue hcan hbe hchanged.
Local h(Variable) h- h hcorrect hanswer-A hvariable hthat his hdefined, hfor hexample, hwithin ha
hsubroutine hand hcannot hbe hviewed hor hmodified hfrom houtside hof hthe hblock hof hcode his
hwas hdeclared hin.
Global h(Variable) h- h hcorrect hanswer-A hvariable hthat his hdeclared, husually hat hthe hstart
hof hthe hprogram, hand hcan hbe haccessed hand hmodified hfrom hanywhere hat hall hin hthe
hprogram.