0% found this document useful (0 votes)
17 views17 pages

CH 11.PDF Programming Concept

This chapter introduces programming concepts, including variables, constants, and basic data types such as integers, real numbers, characters, strings, and booleans. It emphasizes the importance of using high-level programming languages like Scratch, JavaScript, and Python for practical programming tasks. The chapter also covers how to declare and use variables and constants, as well as the fundamental programming structures of sequence, selection, and repetition.

Uploaded by

AbdulPlayz dxb
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views17 pages

CH 11.PDF Programming Concept

This chapter introduces programming concepts, including variables, constants, and basic data types such as integers, real numbers, characters, strings, and booleans. It emphasizes the importance of using high-level programming languages like Scratch, JavaScript, and Python for practical programming tasks. The chapter also covers how to declare and use variables and constants, as well as the fundamental programming structures of sequence, selection, and repetition.

Uploaded by

AbdulPlayz dxb
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 17

® Programming concepts

lnthischapteryouwilllearnabout:
e programming
e dedarationanduseol
• variables
•constants
• bask data types
• integer
• =I
• char
• string
• Boolean
e howtouse
• sequence
• selection
• repetition
• totalling
• counting
• useolpredelinedprocedurevfunctions

11.1 Introduction
Chapters 9 and 10 ha\·e enabled you to de\·elop your computational thinking
by writing algorithms to perform \'arious tasks. This chapter will show you how
to put your computational thinking to the ultimate test by writing computer
programs to perform tasks.
So far you ha\·e tested your algoritluns by dry running. Once you have written a
program for your algorithm, and when there are no syntax errors (see Section 7.4. 1),
you should then use a computer to nm the progr:1.m to complete the task you have
specified. The computer will perform the task exactly as you ha\'e written it; you
may need to make some changes before it works exactly as you intend it to.

11.2 Programming
In Chapter 7 you learnt that programs could be written in high - or low-level
languages then translated and run. This chapter will introduce yo u to the
programming concepts required for practical use of a high -level language.
There are many high -lc\·el programming languages to choose from. For
Cambridge ! GCSE Computer Science any high - le\·el programming language may
be used, howe\•e r if you plan to continue your studies with A Level Computer
Science then one ofVisual Basic, Pascal/Delphi or Python is recommended.
,\1any programming languages are free to download and use. This chapter
shows the use of programming and should be used in conjunction with learning
the S)~ltax of an appropriate programming language.
Programs developed in this chapter will be illustrated using the following freely
a\'ailable languages:

• Scratch: a good basic introduction to programming for beginners that is freely


alfllilable from M IT. Scratch makes programming easy and fun to learn as it uses
visual building blocks. It is useful as an introduction.
• JavaScript: a scripting language that works in any browser, no download
needed. JavaScript works with the H TML (see Section 1.6.2 ).
• Python: a general purpose, open source programming language that promotes
rapid program de\·elopment and readable code.
11.2 Programming

The traditional introduction to programming in any language is to display the


words ' H ello \\'orld' on a computer screen. The programs look very different:
print { • HelloWorld • )

</TITLll >
<SCRIPT LA!!GOAGB - ' J " v"Script '>
docunent .writ e (' He lloWorld 'l
</ SCRIPT>
</HEAD>

Python JavaScript
Figure 11.1 Programs to display

Activity 11 .1
Have a look at all thre-e programs and dedde which program is the easiest to understand .

Scratch and Python work in their own Integrated Development Environments


(ID Es).

·~·~- 1.,.0 (•1 . 1.0 · l><lhrl,~O.O,fl, sop >O lOll, 10, . . ,., , [MSC • • uoo !J H< (lo ~
U ! )] ;~ WUIJl
? ,..... ' GGP¥<i~h•' , 'ettdi<s' or " U«f>HU' ! or ..,,e lofo<Nnloo.
»> - - - -- -- - USLUI.I - - -- - - -

>» I

Figur• 11.2Pythoo l0f

H ell o World

Figur• 11 3Scratd\pro~amrunn;ng
11 PROGRAMMING CONCEPTS

Fig u,. 11.4 ScratchlOE

JavaScript works in a browser.

O HelloWon:J

+ it RVIIOM..-.rtlod<to p/H C! • • Gooq,t JJ EJ• + _!_,

Fig u,. 11.5 .lavaScriptworkinginabmwser "


Activity 11.2
lnthehigh-levelprogrammi11glanguagethatyourschoolha1dios.entouse,writeandrunyour
own program that displays the words 'Hello Computer Scientists'
11.3 Declaration and use of variables and constants

11.3 Declaration and use of variables and constants


A VARIABLE in a computer program is a named data store that contains a value
that may change during the execution of the program. In order to make programs
understandable to others, variables should be given meaningful names.
A CONSTANT in a computer program is a named data store that contains a value
that does not change during the execution of the program. In order to make
programs understandable to others, constants should be given meaningful names.
Not all programming languages explicitly differentiate between constants and
\'ariables but programmers should be clear which data stores can be ch.,nged and
which cannot be changed . There are several ways of doing this, for example :
• use of capital letters:
• meaningful names tl1at begin with Const: ConstPi - 3 .142
It is considered good practice to declare at the start of a program the constants
and variables to be used in that program. Declarations arc expected in programs
written for the tasks specified in tl1e !GCSE Computer Science pre-release
material(sccScction 1.2.3 ).

Figure 11.6Variableandcoostantdeda<abons;nScratc:h

varFirstVar,SecondVar;
con•tCon•tFir ot - 500,SecondCon•t - lOO; Se condVar - JO ~ ariablesandronstants
Con otFir ot - 500 a<ededaredinl'ythonby
:on• tSe cond - 100 assi(jl\ingvakles.
assi(jl\edtl,e;rvalueswhen
lheyarededaredbec:ause FirotVar,SecondVar - i0,30
constConstFir ot - 50;
lheydonotc:haoge
constConstSe cond - 100; Con otFirot,Con•tSecond - 500,100

Figure 11.7 Variableandcoostantdeda<alionsinJavaSaipt Figure11.8Howtodedate variablesandcoostantsinl'ylhon


11 PROGRAMMING CONCEPTS

Activity 11 .3
lnthehigh-levelprogramminglanguagethatyourschoolhaschosentouse,dedarethe
variables and constants you would use in an algorithm to find the volume of a cylinder.

11 .4 Basic data types


In order for a computer system to process and store data effectively, different
kinds of data arc formally given different types. This enables:
• data to be stored in an appropriate way, for example, as numbers or characters
• data to be manipulated effectively, for example numbers with mathematical
operators and characters with concatenation
• automatic validation in some cases.

Integer
An I N"IBGER is a ix,siti\·c or negative whole number that can be used with
mathematical operators.

Real
A REAL NUMBER is a positive or negative number with a fractional part. Real
numbers can be used with mathematical operators.
Not all programming languages distinguish between real numbers and integers.
Ja\'aScript makes no distinction; Python docs with the use of built-in functions.
Firstlnteger • int (25) sets up an integer \'ariablc with the value of
25 in Python
FirstReal - float ( 25) sets up a real lfariablc with the \'aluc of
25.0 in Python

Char
A lfariablc or constant oftypc CHAR is a single character.
var Gender - 'F' JavaScript
Gender - 'F' or Gender - "F" Python

S t rin g
A 'l:lriablc or constant oftypc STRING is sc\'cral characters in length. Strings \'ary
in length and may even have no characters: an empty string. The characters can be
letters and/or digits and/or any other printable symbol. For example:
Var TelephoneNumber - '44121654331' JavaScript
Var FirstName - 'Emma' JavaScript
Var UnRepeatable - ' @! && @@ ## ! ' JavaScript
TelephoneNumber - '44121654331' Python
FirstName - 'Emma' Python
UnRepeatable - ' @!&&@@ ##!' Python

Activity 11 .4
lnthehigh-levelprogramminglanguagethatyourschoolhaschosentouse,writeandrun
your own program that dis.plays the words 'Hello <YourName>'. Use a string variable to store
11.5 How to make your program work

Boolean
A BOOLEAN variable can ha\·e only two values: TRUE or FAl..S E.
Var Age0ver21 - true JavaScript
Age0ver21 - true Python

Activity 11 .5
At the start of a program to store ,;ome personal informatioo you need to set up variables to
store thefollowingdat<1

• address

""'"""
e
e
over/undef 18yearsofage
rnlourofhair
e shoesize
e 'Neightinkilograms
You also need to set up coostants for male <1nd female
• Selectme.-minglulvariablenamesandtypesforyourrnnst<1ntsandvariable1
b lnthehigh-levelprogramminglanguagethatyourschoolhaschosrotouse,writeandrun
yourownprogramthatdisplaysthev<1luesyouhaveusedtoinitialiseyourvariablesand
rnmtants
c Make sure that you un input new values <1nd select suitable test data for your program.

11.5 How to make your program work


Programs work by automatically following one instruction after another in
scguence . Look at the following examples.

1'1r,.tNumb cr • 1nt ( OJ
Se e ondNlllllher • 1nt ( 0 )
Sua • i.nt ( 0 1
l'" irscN\Utber • in t (input( "Enter 1'"1:1;.,,; Whole Nw,,ber: " ))
Se cond.Nl'IE.bc r - int (input ( ~tnter Second Whole NW!lber, " ) I
.5um "' 1'1rso;Numbe r -t- Second.NU!tber
pr i nt (~Trie 9WR equal." ~, Sllll'I)

Python file

Figur• 11.9Pylhonprogram

rwe
>>> rm-----·---
• copvr~qM", • creGi.:a • or •u cer.n (J" ror it.Ore •n rorr::.a cio n.
l!tslAAl - - -- -----
~t.,r!l'frstllhahll.-...ce ~

~t,,,.~•c<mdllholc-•, ll
Tl>es-cQUAl.s n
>» I

Figure 11.1 0Pylhooprigamrunning


11 PROGRAMMING CONCEPTS

1
l ;;;;;:.;,-·=
:::-;~. ~ ~-- :J,.....Scr,pt">

:: ::c:~~u •
0

O,
lluurw.l,U • "'-"<10,.,prciq,t( 'Enar Uut "?a<>l• ,i-.,r• , '' I:
5• c<AU&tM1r-"1.nc1c,w .prcq,( 'EntuHaon<1""°hnmat>u•,•• i ,

Figu,. 11.11 JavaS.Criptproc:,am

1------
Explorer User Prompt - J

:1
I _:
-
112

.,;---
1--
Explorer User Prompt

l!'IJ • Iii! • Gl oi • £age • ~fety -


~1
,.,.,, . 8 · 0 0 0
The sum equals 25

Figu,. 11.12 JavaS.Criptpriqamroonk,g


11.5 How to make your program work

Sometimes the next instruction to be obeyed will depend upon what has already
happened before and a selection has to take place. Look at the following examples.

S • ccndN •= • u,t iO)

~ - ,· Nir.t t IO) ·nti .fll' "-Ci "E.D<u h n t . -.a.b -~-


, eccnON=t>er • i n t. \ 1IlJl H i •un.u ~ 1111<>1- _ , , " ))

Figur• 11.13Pythoopriqamshowin gs.election

Python S .S.O (vS.S.0:b!l! d'bnet>fl, S..p a lOU, 10:55 : H) [M5t: v . UOO S2 bit l l n •
t.d)] on 111n32
ype: •copynQnt.•, •cre,nt.o • or • ucenoeo• ror aore 1nrorut.1on .
>» UHiUU

~u~ n ut ll?loU - "' ~


~t.,.,.,.,..... ....
ole N.-,.< : 3
Pint. Whole &u.t,,,,r h h ~ ot 7

Figure 11.1 4Pythooselectionprog,amrunning

fil<{d i.:,C."h','~f,,,!!!dl.>"9<»<1•l.t!l-"'9>MoooR""T~FX. Pl"'l~ l'(n~ X


od f311il o o~l ~tafR l ~~ l • \r l t ~LCBtii / "'., 1 a!}!D l 'il !ii:i: _ :'

~SCHPT u.nz=>: • "Jn •Ser·p~ " ~


va.r Hro c11unr,,,, - o :
va.r SecandRmber - O;

FirotN<mt>er - vind<Y~ . pra,:pt( '~nt e c firot ><t.al e nu.,,t,e r' ,


S • condll"""'u _ ,,,_n<b,...prccpt ( '[r.tu . .c,on~"hah n = u • ,
Fir,tN<mt>er - p~r,ein t (firotN:mber)·
se coooJ<U!lll:er - c,,,r oe incc aec o n = n ·
H 1nroc11unr,,,, ;,,econ<lN.-..r/
docu.=nc . w: 1te{ 'fir otWhaleNam>er, ola ag,,,t

docu=nc . w: ite( 'Seccnd'1!>.olellemberi,lar1Je ot


l' ~ / SCRIPT>-

20 </1'0DY>
</HTML>

Figur• 11.1 5laYaS.O-;ptselectioop<iqam


-
11 PROGRAMMING CONCEPTS

&plo,..., Usu Prompt

~f'roqt:
Erterl'ntwholerunber

-
po

&plon!':r Usl!r Prompt

I~

-~'. ~ I ~ C:\Usim\H~en\ DHkll p • C I e SO!querm X I


X Goc.gle L • ~I SO!arch • I· Mo re » Sign In ~ •

Gi . lii1. ea 'ffl' . f•g• • ~foty • T2ol, • G· lliJ lll 0


Second Whole Number is largest 56

Figu,. 11.1 6JavaScr;pts.electionpmc_,amrunllOn9

Sometimes instructions need to be repeated several times so a final result can


be obtained, this often im·olvcs the use of totalling and counting. Look at the
following examples.

fi!.lditfg,m,tftl,n ~ ' t ( - l:l<IP

=r--.:t
~- • u:c (0)
1~~)

..t,,h Co~nt ~ 5:

Figu,. 11.17 Pylhoorepeti!ioopro~am


11.5 How to make your program work

Pythor. 3 . 3 . 0 l v3 . 3 . 0:bd3orh9Dtl>n, Se p 29 2012, 10:SS : •8 ) [ HSC T . 16JO 32bit i in _!

TYi>" • copyrl~"t", •credH • " o r "Hce n, el)• ror mo re 1nror=t1o n


»> - - - - - - - - - - - -- - -- RL STM<T - - - - - - - - - - - - - - -- ----

! nt ernWho leNwr.ber:
! nt eraWho leNwr.ber :7
!nt eraWho l e NUlf.ber : !
! nt e r aWho l e NUlf.be r: 9
! nt e r aWho le NUlf.be r: lJ
!: r ! ! iTen:mt>er,i, to

Figure 11.1 [email protected]

f ;i,, {di: ~•"h '{~ f"'![!d J..,ngUO'j t 'i<!ling, Mmv R.., TcrtfX 11"'1i"' l'{ndow Z
., d im• . ;, ~ l -1'~ ~ 1;, cl • -\r l t -c l llitei l e::;,(I!}"51 [!1 ~

H wlu ! e ' (Co=tc< 5 );


t' document. l'ri t e ( 'SU1" c ! rive nm,l"-, c ~
H </~CRI PT:>
H </lllAD>

</BODY>
n </KrML~

Figure 11.1 9laYaScr;ptrepetitiooprogram


11 PROGRAMMING CONCEPTS

bplorerUnrPn>mpt

~
-
J;==-- ~

Explorer User Prompt

~
-
J;==-- ~

1--;·---
:
Explorer User Prompt -

~
~
-
1--;·---
:
EicplorerUserPrompt

~
~
-
1--:·---
Ei<plorerUserPrompt

~
~
-
:
O T fill T ~ -ii T ea;t " Saftty T T.11.ols T . .. 0 0 O
Sum offiH: numberli 1s 20

Figu re 11.20 Java5crip t ,epetitiooprogram runnmg


11.5 How to make your program work

11.5.1 Sequence
Statements are followed in sequence so the order of the statements in a program
is important. Assigrunent statements rely on the variables used in the expression
on the right-hand side of the statement all having been given values. Input
statements often provide values for assignment statements. Output statements
often use the results from assignment statements.

'II

11.5.2 Selection
Selection is a very useful technique, allowing data items to be picked out
according to given criteria, for example selecting the largest value or the smallest
value, selecting items over a certain price, selecting everyone who is male. This is
done with the use of if and case statements.

Bighe • t - Number
print('Ahrgernwaber hu be e nfound• )

iflKuoiber>Highe • t)

JavaScript uses curly Bighe• t - Numbe r

~~!'n~ ~";:'~:!~..i
ifthenumbe,islafge,than
docu...,nt.write ( 'Alargernurbe rhasbeenfound')

lhehg)PSI

Figure 11.21 Selectioo

Activity 11.6
Usingthehigh-levelprogrnmminglanguagethatyourschoolhaschosentouse,findoutabout
the structure of i f .. the n..el s e and cas e statements. Not all programming languages indude
theuseofaca s e statement

11.5.3 Repetition
Most programming languages support three types ofloop:
• a fixed number of repetitions
• an unknown number of repetitions with at least one repetition, as the condition
is tested at the end of the loop
• an unknown number of repetitions which may not be completed at all, as the
condition is tested at the beginning of the loop.
11 PROGRAMMING CONCEPTS

forCountarinrange(l,10), ~ .
print(• • •,end - ' ' l ~

for(varCount e r - l;Counter< - lO;Counter - Counter + l)


{
Jav"5criptUSl'5c,.fybfad::ets
toioentilythestatementsto

-==--J beexeruted;anewvariable
withastartingvalue,coodibon
andincrementissetupfo,the
looprounter

Figure 11.22 faednumberofrepetitioos

HewValue - window.pr001pt('Pleaoeenterapooitivenumber',

HewValue - p a ro e Plo.o.t(He wValue )

JavaSaiptusesrurfybradetsto
ioentifythestatementstobe
exeruted;thecooditiooistestedat
theendoltheloop

Figure11.23 Unknownro.Jmbef ol,epetiboos,atH'ast onerompleted

NewValue - float(input('Pleaoeenteranegativenumber•>>

NewVal u e - float( inpu t('Pl<iao <i e nt e raliEGATIVEnumber'))

========={ Pythoousesindentabontoideoblythe
statemeotstobeexeruted;the.cooditioni,
]

testedatthe,tartoltheloop

NewVa ,><1 - wim10w.p~t('Peueenteranegativenumoer',


NewVal u <i - pan e Float(N.,...Value);

NewVal u e - window.p~t(•Pl e u eent e raNl!GA.TIV&nwsber•,


NewVal u e - paneFloat (NewValue )

- - - = = = = = = : : : : : : lJavaSaiptusesrurfybradets.toioentilylhe l
statementstobeexeruted;theconditioor,
testedatthestartoftheloop

Figure11.24 Unkl\0Wflro.Jmbefol,epetiboos,statements inloopmayn..,e<beused


11.5 How to make your program work

11.5.4 Tota lli ng


Totalling is used with repetition with the total updated e\·ery time the loop
is repeated. K.:eping a rmrning total is one ofthe most frequently used
programming techniques in many computer systems, for example, the total on a
receipt at a supermarket checkout.
·--······-·-·-··-······-······-······-···-
L~.'::.'::.'::.~.P.~.'!.::~:~.--~·-··-~.'::.7.~.~-~-~-~~~.:~---~----~?~.~.?.~.~-~-~.:?.___ _
11.5.5 Counting
Counting is used with repetition with the counter increased by 1 every time the
loop is repeated. Counting items or events is another of the most frequently used
programming techniques, for example, counting the number of items sold in a
single transaction at a supermarket.
iNumberOfitems .. NumberOfitems + 1

As well as counting upwards, a counter can be used to count down with the
counter being dee.ceased by I every time the loop is repeated, for example ,
removing an item from stock every time one is sold.

11.5.6 Writing programs


Exa m ple 1
Tickets are sold for a concert at $20 each, if ! O tickets arc bought then the discount
is 10%, if20 tickets are bought the discount is 20%. No more than 25 tickets can
be bought in a single transaction.
a Write a program to calculate the cost of buying a given number of tickets.
b Show how you would test your program.

! ~ uo tr1eko u • l.at (01


D10 co,,..~e • Ue o t IOJ
,;01,: • U 0"-< ( 0 )
wt,Uc l<".zl>crOtr1cr«,t:1< l >e !>wu><,rO!'T1ckoe~•25 :
11".-1 .0f llalr,tu • U aa t ( u,put '"*"' -"·"1'
uenu -1e1 '""" Hlr<I u, DaV' '))

t ~- e OtTickcta < 10 :

:::":-e::.'.1.:~; ! =~,!;~!,e:o=,,=.=,.=_=,.=..=_=.=, =~~ :~!! ~n~t1':bination of )


.~ eJ"e~
pnc.t l 'Yuctn.ocon• , co n 1

Figure 11.25Exampje1inl'ython
11 PROGRAMMING CONCEPTS

fk 1• s..... -

-~ --
-1.nj- -.. _,, ""' ,_, . ... -
a iJ lilQ·,D ~~ - ~ ;ll ~ j . ... t
l
1 l cDaJ r.a1~'iJ O O ~ l!j·j ..i :JI O ';>

...,,.rtl>Chc ""t• •
..,_, . ,,,,,.1.,
u n • - -pr-,CI
(..,_rtlfhe<C;o)
w- '-'.c <o0• ~ Uy<• L, k• ~ , , •,

..,1J e <(l<'-.,<>n1o•ot• < l ) ll(,,_.,,,ruc.,to > 14 0,·

H , .....,, , «OC,:1'h U < 00) ~ ,-----.,,

~-.c-, - ~.O ~

··-
Ccot • N-.Ortlfhckoe, • ,O •
•~•• -~«•( · =•<•n• co c~,,

F1gu re 11.26 JavaSrnp tprigamfo, E~ 1

fltfditSl,o(_l~Qpti o n , ~ tioif
Pythcn3.3.0 lv3.3.0:bdSo fl, 9o.1>f2 . 3~29201:l,
~el.)J er. ll>nl2
,.,...,., •co ~·,r::.or.t•, •c,:e<IJ.:s• or •uct.~aeo• tor 110re 1nto,,..tic~.
»> R!S?AA?

Youre1crusooo.2 u. o
l > - - - - - - - - - - - - - - - - - - R!Slr.RT - - - - - ~ - - - - -
lkw iu.ny cicb u ,u,ald you li b t o buy? 2
Your e,cttu coo c tO . O

- ...... ; i cUu """1.d YOU Uh <o b,iy? to


""" - ny eict~~• ,mul.d you li b ~ o buy • - 1
lkw ... nyticbU,..,,,ld:fDaUtt.tobuy1 7
Y<lltt u ctt.uco • c UO , O

Figure11.27 Pmgram!P<lingfxamplel inl'ython


11.5 How to make your program work

,..
~ c,1- 1D<>tt, P • C · ~ 1
"('.o<-gl,: · !l lo>«h • t ...,.. . s.,. .. , .
a.g . i:;:i ,.. . t •!I' · }of•,- '2'11> · e · "' Q o

r2!lk ,Jlll -:.-w...o..-w,.... P• d 9 1,..,.,, ~1 ><I


X GoooglrL____:J {l>H " h· f Uo,e» Sion .. " ·
a- liiil - ..i • - f,.., . ,.My· ,~,.,-
e - li?l Iii o

Figur• 11.28 Program tPStingExample 1 inJavaSaipt

Activity 11 .7
Usingthehigh-levelprogramminglanguagethatyourschoolhaschosentouse,writeaprogram
for Ex.ample 1. look at the test data used with the Python and Ja~aSuipt solutions; explain how
you would improve this test data to ensure that your program was fully tested
11 PROGRAMMING CONCEPTS

4 Write three programs showing the diffe rent ways


End-of-chapter questions that can be used to add up five numben and print
l Explain the difference between a variable and a out the total. Explain which loop is the most
constant in a program. efficic:ntto usc.
2 State four different basic data types. 11lustrateyour 5 A sweet shop sells 500 different sorts of sweets.
answer by declaring a variable for each o ne and Each sort of s-,vcct is identified by a unique four·
assigning it a value. digit code. All sweets that start with a one ( 1) are
3 A school with 600 students wants to produce some chocolates, all s-,veets that start "~th a two (2) are
information from the results of the four standard
tests in Maths, Science, English and IT. Each test is
out of l 00 marks. The information output should
j:1~:s~~l :;~::~~hs:~:::;~i~i~:~;:!3Js:~d
can start \\1th any other digit except zero.
be the highest, lowest and average mark for each a Write a program, which inputs the four-digit
ttst and the highest, lowest and average mark code for all 500 items and outputs the number
O\'erall. All the marks need to be input. of chocolates, toffeu and jellies.
a Write: a program to complete: thiis task. b Explain how you would test your program .
b Explain how you would test your program.

You might also like