General Computing PDF
General Computing PDF
General Computing PDF
!~
.::
.I
.i
i
.i
Lebanese University
Faculty of Economics and Business Management -Section II
Academic Year: 2018-2019
Univeiliite Libanaioe Department: Business Computer Level: Ll Semester: S1
Authorized Documents: Only one paper A4 recto-verso digitally typed . « ••• « « •••
« •• " •• « ••• « ••••••••
HTIP protocol, URL, web browser, left, href, <br>, <a>, <head>.
e) In a link, the address of the page that will be opened is coded in the property _ _ _ _ __
ofthe tag _ _ _ _ _ __
f) The tag that should not be terminated by an end tag is _ _ _ _ _ _ _ _ _ __
g) the default alignment of an element in a web page is to the_ _ _ _ _ __
Q1) The HTMl tag that makes a text bold is: a) <p>
. b) <paragraph>
a) <bold>
c) <par>
b) <strong>
d) <parag>
c) <bd>
d) <p> Q4) The HTML tag that allows to create a link to
other web pages is:
Q2) If a hard disk has 3 double-Sided disks, and
paragraph is :
...1 c) x.y.Z
Page 1/4
., ,
Q6) Which of the following is not a web Q12) Which of these tags does not need to have
browser: a closing tag:
a) Google chrome
aj' <Ol>
bI Internet explorer
b) <UL>
cl Windows
c) <U>
Q7) Most of the code in an html file is coded in Q13) From the following html code portions,
the tag: which one contains error:
al <HEAD>
a) <ul><Ii></Ii></ul>
bl <BODY>
b) <ul><Ii><ul></ul></Ii></ul>
cl <TITLE>
c) <Ii><ul></Ii></ul>
Q8) Which of the following tasks is realized by Q14) To insert a textarea in a html file, we
the BIOS: write:
a) Transporting data from central memory
a) <input type~'textarea">
to processor
b) <input type~'texf>
components
d) <textarea>
a) <TD>
write: c) <TR>
al <a href=http://www.facebook.com>
d) <THEAD>
b) <link="facebook.com">
Q16) The largest positive number that can be
c) <a=..www.facebook.com.. >
coded on 5 bits is :
dl <link href=..www.facebook.com..>
a) 5
Ql0) Which of the following program can read b) 15
and render (display) an html web page: cl 31
a) Microsoft access
b) Skype
number 18102:
d) Google chrome
Page 2/4
Q18) From the following memory which is the b) E-mail management
b) Register
c) RAM Q20) The number 100 in decimal is equal to :
d) ROM a) 4 in binary
b) 64 in hexadecimal
Q19) for which internet service IMAP protocol is
c) 157 in octal
used?
d) None of the above
a) Chatting
Ex.3 (7pts): Respond by true or false and correct the false expressions:
a) The title of a web page is coded in the <body> part ofthe html file
c) The text in heading <hi> is smaller than the text in heading <h3>
d) A public IP address identify a computer on the Internet and can be given to many computers.
e) The protocol that allows to obtain (resolve) the IP address corresponding to a machine name is
Ex.4 (13 ptsl: Write the HTML code for the following page:
LHa!-1th
2. J\d>r&6,"(h
). Tr;pot!'
tAlcy
5, Nl\bllri~h
6.RAWyll.
Hint: The image of the LU is named lul,png and is located in the folder "photos» which is in the same
folder of the html page.
Page 3/4
, , .
Ex.S (12 ptsl: Compute the following operations.
Ex.6 (6 piS): Demonstrate the following equations based on the Boolean algebra.
aJ x y z + y (x + z) + x +y+( x z) = x + y z
- -
b) a+ab+ac+abc=a+b+c
Ex. 7 :4 pts): Write the html code for the following page:
• Lebanese Uni,-ersity
1. Faculty of science
1. Branch I
2. Branch II
3. Branch III
2. Faculty of Economics and Business
1. Branch I
2. Branch II
• American Unh'ersity
• Canadian University
Page 4/4
Lebanese University
Faculty of Economics and Business Management -Section 11
Academic Year: 2018-2019
Universlte Ubaualse Department: Business Computer Level: 11 Semester: S1
You are asked to make a logic circuit, with 3 inputs (a, b, c) and 2 outputs (f, g), which provide
the number of 1 (in binary) applied to the inputs. The outputs f and g represent the bits
corresponding to the number of 1 in the inputs. For example, if we have 2 inputs to 1 and one
input to 0, so the number of 1 in the inputs is 2, then 2 in binary is 10, so the outputs are 1 for f
Write the html code for the 2 following html pages: index.html, and branches.html
~ L"llliljl
) PflOn('
4 PW~I
Hints:
-In the index.html page, the manager's email isadmin@abs.com/:~~.~.
-In the branches.html page, the link goes back to the index.html pag~:,/' <'.:"'';'''' ' )
l: ii
,;;)1
I ,'" (
L"".' <
~
....
.,' '
d !>age 1/3
Exercise 3 (9 points):
Perform the following binary additions on 8 bits. Indicate whether there was a carry or an
overflow.
Reminder: there is a carry when the number of bits in th,e result is greater than the number of
bits in the operands. There is an overflow when the operands are of the same sign and the
result is of different sign.
a) 1 1 1 1 1 1 1 1 b) 10001111 c) 01 11 1 111
+ +
a)
<01.>
<1i>Accueil</IL>
<li>U05 se:rvices<!li>
<oJ>
<lbCon<:eption de sites \'leb<!E>
<li>Hebergement</li>
<li>Oeveloppement d' applications \'leb</li >
<lob
<fih
(01)
<li>Notre equipe</li>
<li>Historique</li>
</01>
</li>
<li>Nous contacter</li>
</01>
b)
<TABLE BOROI;R_l.>
(TR>
<TO>Column 1<1,0>
(TO>Column ~<I.D>
<TD>Colvmn 3</TC~
<11Ft>
<TR)
<TD:>Ttem 1</10>
<TO>'It:em 3</TO~
</TR>
<TR>
<TO>Item 4<110>
<TO>ltem S<I.O>
</ToR>
<TR>
<TO>:Item. 6</10)
:1
<TO>I:tt!m. 7<110> ii
<TO>:Item 8</10>
</TR>
<TR>
<TO>.lte.m. 9</10>
<'TO COLSPAtJ"2>:I1!<!!m :10</TO:>
</TR>
</TASLE>
Page 2(3
Exercise 5 (3 points):
You want to buy a computer. Two computers A. and B. are in question and they are at the same
price. Which computer do you choose? Justify your answer.
A. Computer A is Weight: l.4kg; Type of system: Laptop; Processor: Intel Core 2 Duo T9600 /
2.8 GHz (two-core); Cache memory: 6 MB • L2; RAM: 4 GB (installed) / 8 GB (maximum) - DDR3
SDRAM - 1066 MHz; Hard disk: 750 GB - 7200 rpm
B. Computer B is Weight: 1.4kg; Type of system: laptop; Processor: Intel Core 2 Duo T9600 / 3.8
GHz (four-core); Cache memory: 8 MB - l2; RAM: 6 GB (installed) / 8 GB (maximum) . DDR3
SDRAM· 1066 MHz; !:lard disk: 750 GB - 7200 rpm
Exercise 6 (8 points):
Complete the following table by the criteria mentioned in the comparison between a hard disk
and a RAM memory:
\~.
\ .
Page 3/3
Q6) What is a website?
Ir.4
Lebanese Ulliven;ity a) A server acting as a directory
FlIculty of Economics ano Rusifles-~ Man:lgement -Section fl b) A dynamic computer security site
c) A database containing protected official documents.
AC:ldemic Year. 2017-20IB d) A set of web pages linked together by hypertext links
Department: Busincs$ Computer Level: LI Semester: S I
Universlte Llba;ll1ll$e
Q7) Which of the following propositions is not an operating system?
Exall1: 0 Mitlterm ~ Final o Resi! Exam a) Google Chrome
b) Android
I~~nm Title: Infflrnlatique generate. .. Time Allowed: 120 min,
c) Windows
d) None of them
c\utborrleu Do,;:uments: 2 pallcrs recto 'ier,so
A!llheriUl.d Calcul"lOr (non-proernmmtlble): o yes I8l "0 QS) To which sysrern(s) can belong tile number lOa02 :
Spedallnstrudiolls: ...
a) Binary
b) DecimaJ
Exc.!.£!ll.c 1 : nutltinlc choice: note that some questi.ons can have many resoonses no point..)!
c) Hexadecimal
(~1) Which of the foHowing logical functions is (are) eqllivalent to the function xy+xz+yz if x¥1 ; d) Octal
a) XY+7.
b) :;y
a) Memory management
c) x+y
b) Accessing weooites
tl) xy+xz+-,(.
c) File maMgement
d) None of them
Q2} With 4 bits, using the signed value convention, the greatest positive number that can be coded is ;
a) +8
QI0) Which ofthe following answers is not mandatory for a machine to access totemet?
b) +3
a) Network card
c) +7
b) Public IP address
d) +4
d) None of them
Q3) Which of the following logicm functions is(arc) not in its(1heir) canonical (nom1al) form?
<I) f(x,y)'""x1y
E:xerei$e 2 ~ Respond by true or false and correct the false expressions (5 points).
b) F(a,b,c}""'abc
c) f(x,y,z)=xy+xz
a) In an algorithm, each instruction "if' must have en instruction "else",
d) F("bHb
b) In 2's complement on 4 bits. the interval ofpossib1e numbers is [-8,7].
a) J024 bits
e) The component of the processor which gives commands for read and write operations is the
b) &l92 bytes
logieai and arithmetical unit
('.j 1000000 bils
Exersise 3 (5 points) : complete each or the following sentence." by the corresponding following word:
d) 8192 bits
1//:!t"1,'tta\,r,
,:,~,." . . 11r,."'
. . ""'·0 a) A allows to access web pages on {rtternel. /f{~;';~;,~ ,,,..
b) Tho lS the protocol used by It browscrto access websites. /" -". "",JI'-;;}J,\
b) Ccntrolmcmory(RAM) I'
,;
1:) ROM ~;
e) A computer which provides services for other computers is a . /.t,~;" ..: ·,·i:'..
t(1
d) Register
d) The, is the protocol used in Internet ttl identifY a machine in a Jirfique manne:!':,\ ._. -...
\1 - ':.:' . ' .. 0'
\', F.;,.;..: _.'.,:".
\~\h('k,~ ~,: ¥."~;:f:.':'.t "i.':('·:::;~> \1. '" <t, d, ~ege.]/~
~~t 6_ f..es\;;P.a'ge~14·( ~;,.
~.
, $e;:'!-..," I: '~{! c' G';,;::';,~'::'
-::.~" ..;:;c"'="'-'
"".<.','''': '
c) A computer which uses services pl'ovided by olher computers is Enter 3 Integers: 5
2'
0
r::x"3')" 4 (1
eases; oo;n"l: G;ve <he OUlp", on "recn of <he fo!low;ng algorithm in caeh of the follow;ng 12
The maximum Is 12
Algorithm 'fest
Varillbcs:t, b, e ; integer
!llggl.~ write an algorithm, namely GREETING, whieh allows the user to enter his first name, his last
Bl'glU
narne, his gender (manlwoman), and his marital status (single/married), To simplify the exercise, it is
Read (II)
l;onsidered that the user will enter 1 for man and 2 for woman, and 1 for single and 2 for married. 'Then,
Read {h)
the program will show a greeting message to the user as shown in the example below:
Read (e)
entlif
Note that: if the person is a woman and single the title Mr will be replaced by Miss, and if the person is
else
writc ("3«)
cJ.~1'
Exercise 6: flO points) :
writcC4' )
endif
Let the following logical function which is defined by the following truth table:
endif
wr·iie{"o· )
x y z r
1~lld o 0 0 1
a) 11.=.05: b=o2. c'""'3
o 0 1 0
b) """2, b·"2, c:o>2
1 0 0 I
e) «=3,1>""""5. c"-'3
Q 1 o 0
d) 11""2, b""J, c"'4
1 1 o Q
e) a"'2, b-"'3, c"-3
0 1 1 0
1 0 1 1
1 1 1 1
EXet'Clse 5 : Choose and write 2 l:llgQrithm,'i from the 3 following ones (20 points):
a) Give the sum of product (SOP) form and the product of sum {POS) form of f.
AJ&Q1..; wtlte an 31goritbm, namely SORT, which allows the user to enter 3 iutegers, then sorts and prints
b) SimplifY the function 1:
ill ascending .order the sorted integers. An example of exeeution is given below;
c) SimplifY the func.tions G and H given below:
l'~njl'r 3 illtct:efs : 5
l{;;~:;;;~;~,!";· \;:,;~~,,,
i/ ";.' ..•. ',K
A.Jgg2: write an algorithm, namely MAX, which aUows the user to enter 3i:integers )I!cr{prints the
;naxi';m of these intege"" An example of exec";;on is gIven helow : ,)/ ,i':::::': " /'.
11 ".
'\
\\''\\ ; ~:::r\:,p~~~.3/1'
,L
\.{'V.
:'E' !"~
"
'~>.':;. -:;",,";':;";:",,-.
Exam Title: Inronnatique generale.,.." ....... ,. ........... ", .... "" .. ,.. " .... Time AHmved: 120 min.
Special Instructions: .... ,.. " .. "".... " ..... "."."." .. "" .. ,,,,..
a) Give 2 differences and 2 similarities between a RAM memory and a hard disk,
cJ Give the equivalent in.!linary, then in then in hexadecimal. of the decimal number 45.
Write an algorithm that allows the user to do a temperature call version, The user is asked to enter fil'st the
temperature, the conversion mode (I fol' from Fahrenheit to Ceisills, or 2 fol' fl'om Celsius to Fahrenheit), alld
the program will show the result. The conversion formula is given below:
Temp, il1 Cel,ius ~ (Tell1p. ill Fahl'ellheil- 32) 1/,8
Sample output:
Enter" the tern perature: 32
Choose YOllr conversion mode (1 for from Faln"enheit to Celsins or 2 for" from Celsius to Falrl'enheit) : I
.i The temperature in Celsius is 0
I
Exercise 3 (10 points) :
Write all algorithm that allows the user to enter 3 integers, then displays the average and the ascending 501'1
Enter 3 illtegers: 12
7
The average is 8
The resnlt of the ascending sort is: 5 7 12
Exercise 4 (10 points): Give the result on SCreen of the tollowing algorithm in each orthe fOllowing cases:
Algorithm Test
Val"iables a, b, c : integer
Begin
Read (a)
Read (b)
Page 1/2
Read (e)
if (a < !J OU !J < c) tben
if «a+h+c) mod 2 = 0 } thell
write Cl" } .',"
else
write ('2" )
endif
else
if(b = c) then
write ("3" )
write C4" )
endif
else
endif
endif
elldif
End
Exercise 6 (S points) : Respond by true or false and correct the false expressions:
e) The possible digits llsed in the octal system belong to the ensemble: {O, I .2.3,4.5.6,7,8}.
, '
r---~.4l
f' -,' .
~ c·· , " r::'i,:"~j "c,
r-"'~0"'I
~.. .-~ C~~J ~]
~"'\
"'.~ ','
~-,~---.
"....
~~~
.)
:.:.~
;:':?~.:::?i
" nf5cr
Q5- Which of the fonowing representatidns corresponds to the operator NOR (not or) with 3
~
Lebanese University
inputs:
..•. Faculty of Economics and Business Management ·--Section n a) i +-y +z
0) >.Y"
Department: Business Computer Level: L1 Semester: 51
tJtil~l'!llf6 Lthl!n1iUc @ x+y+z
Authorlud Calculator (non~pr'ogi-ammubIC): tgj yes 0 no Q7- Which of the following propositions are non volatile:
.) Centml memory
0170
~lU ~~ ® Logic and aritlunetic unit
c) 88 ~ e) Co~and tmit .
Q2- Ifa hard disc contains 3 discs, each one contains 20 tracks of 100 sectors each (sector of512 Q9~ Which of the following characteristics is not related to the address bus;
bits), whkh ofthese following files can be stored on this hard disc: a) Bus ~hieh transniits memory addresses '
a) File of de 3 MB (mega bytes) ® Bidire,;tionnet bus '
® File of 300 KB (kilo bytes) c) Bus connecting the p~ssor to the central memory
0) All of them
QlO- The most simplified form of the function f(x,y,z) ;:; xy + xYz + i" y is :
) 'f
a I \" 0'~U''t: ; w,",d,.. f~
\6 D ..en' IU!.. b) x+ Y
b) for @y
c) else d) X
d) while
® F!I)A _-, <;. "ll" -s:. '\.\J.l\ \ \;)Q)( ~\ c' <;:; "-"'''' '" (('/\D , J
c) 1001
b) . IS an operating syStem developed by Apple
Jr'
d) FAFA
l-,v ".,
t;l
. . ",:( lj ':;
4;:\"";~' '_.,
fift 1 !/ -.-:f \, ,:.>
. -.---~-" - ""----.-.~--"
'.
"'. :
' .."',",
,he '
Consider the·foUowing algorithm :
Algorithm T ..t
variables-a,b.i: integer
begin
reod (h)
a) In an algorithm, aft IF il1stmetion should always have an ELSE instruction" Is tha.t true or for i from 1 to 4 by step +2
false? ir(a>~b)'th.D
b) The execution of the following algorithm leads to an irJinite loop (the progratn does not ir:(a>O or 1»=0) then
stop} why?
if.(atb) mod 2'; 0) the.'
Algorithm Essai
a ~a+i
Variilble:' a : integer
b't-bC2
Begin
__ 5
wrile(a+b)
endif
While (11)0) do
et~
:1"4-- a + 1
. write ("blabl.bl.")
endWhiJc
.t-b
End bt- •• b
c) In an algorithm, an ELSE instruction is always related to an IF instruction. Is that true or write e1pas mal lf)
false? .t-.-l
~~xercise 4 (15 MarkS): endif
write (i).
Write an algorithm that allows the \l5eT to enter his I her first name, last name. marital stat\lS (1
endtor'
for married, 2 for single), gendcr (I for man, 2 for woman) and then prints a greeting sentence
based on the mar{tal status and gender of the user. An example of execution j~ given below: end
a) Give the trace and the output of this algorithm in Cach of the following cases:
Enter your marital status (1 for married, 2 for single) : 1 a.=~2) b=~3
Enter your g~der(l for male, 2 for female): 1
Good momi~ Mr K~rim Ishak b) c:~gOrithm into a programming language of your choice
,---
,"~t:i;~:/:' ,'.
" ~_ ~"~,1
, ,oR", ~
\
" _iY '& '~i
" "-' l: , ~,
- /)' !:'
.
.'
:;": ,':, '
~%,
...-:-: ~
r:'"
c) Android
Lehanose University 0) lOS
1:4
,
UDh·.ct:dt~L~
EUUl~
'.
0
j<'aculty of Economies and Business Management --Seetion 11·
Level: Li
0 Resit Exam
Q5) The fastest lDemotY in access time is ;
@ Register
b) ROM
cJ RA,l,1
d) Hard disc
Exam Title: lnfornllltique generale ,,"""""" Time Allowed: 120 min. a) Memory, management
b) File management
S~ial IO;ltl"uctio)1s! ,.. ,... ,., .. ,...... , ........ " ......... "." .. ,.. .,.,."... , ..,.,.., .... ,... ,.................. ,... .
Coordinator: Dr KarilJllSHAK
Q1) Which of these propOSitions influence directly on the functionin~ speed of the computer'?
a) Clock frequency
QI) The first program that is lUUrlched when starting the computer and is responsible for the lest oj Graphical card with high perfonnance
b) 'Operating system'
a} Sum cfproduct ofa logical function
c) A.nt'lvirus
d) Microsoft office
d) None of them
Q2) 10 the signed value method which reserves it bit for the sign, the highest positive number thllt
can be coded an 5 bils IS : Enrt:ise 2 (5 ooints)
a) 5
Respond by True/false and -comet the false expressions.
0) tl
a} lD the algcritbm. each statement "if' should have a mMl.datory " else" statement
0) t6
b) 1n2's complement with 4 oilS, tbe interVal of possible mllnbm is [-8,7].
d} 31 c) The canonical sum of the logical function i{x,y.z)= xy+yz is f(x,Y,ZF xyz+x)'Z.
d) To work. nprogr.un must be loaded into the rnain memory of the computer.
Q3} 1bc smallest storing unit of a nnrd disc is : e) The logicl function nx.y)~+x)' is equivalent to the function f{xSj-y
a) iTa,k
0) plat.
Enrcne:3 (IG points)
c) sector
A company wants to buy coropute:1'i> fot some of its positions. Each position has specific criteri-a
d) cylinder
that must be taken into $Gcount fur the purchase of a computer. The PQsitions: are described as
follows:
Q4) Which of these propOSitions docs not correspond lo an operating system?
!\) Windows phone
b) GoogJc chrome
K'V>' ".'
L ~
~ ~ .
.: ,:.:::. .;: ',:, .. -':' .. . ~~-> :;;: , <:.,.'
~ Maunger of the IT department that needs storing permanently large data and need lntcmet
Part !: Give the trace and the result on screen of the proposed algorithm in each following case :
connection.
Manager of Audit Department that needs to do u tot ofquick calculations and programs require a) x=5.y=7,z=3,tc=4
at least 2 GB memory to fUllction welL b) x~, y=5, ",,12, t=12
- M.IInager of design and marketing department which needs high graphics resolution for c) ,=12, y=13, .=5,"3
images ll1ld animations. For this post, the speed is nof un important criterion. d) x=8.y=8,z=8,t=8
~ General SccretBry who has to write reports on a small lex! editor program that does nol require
high performam:el but cons) he must keep and archiw old documents that can be voluminous. FOf' Part 2: Translate this algorithm in a programming language that you know, or in a flowchart
Uus post, the eompany docs not expect to pay a lot fe>r the purchase of the computer.
Exercise 5 (12 points)
Given the informntion presented above, what computer do you offer for eacn position among those
listed below? Justify YOut answer. Write an algorithm that allows the user to enter 100 integers and then offers him four operations it
can do:
Comp A : 3.5 Ghz., graphical card 2 GB, RAM 8 f;B, HD SOD GB I no network card t lOOOS
Comp B : 1.7 Ghz. graphical card '2 Gn. RAM 2 GB, lID 100 GD, witb network card) 800S 1 for calculation and dispJay of the sum ~,!a.ven numbers entered,
Conlp C : 2.S GbZ:, graphical eard :1 GB. RAM 4 GB, HD SUO GB. with network curd. BOOS 2 for' calculating the average of the-2$} ri'umoers entered,
Comp D : 1.7 Ghz, gnpbieal curd :3 (;D, RAM 4 GB, lID 500 GB, no network csrd, 12005 3 for caleuJation and display of the number of the entered integers whieh are multiples of 3 (i.e,
Coml' E : 4 Gbz, graphical card 2 CB. RAM I GU, HD sao GR, no network card, SOO$ divisible by 3),
Algoritbm Test
Variables l:.3,x)t :integer
Begin
Read (1,)',.,t)
While (:x<::::y d z<=t) do
if (y<=z) then
Writ. (1)
if (l:<Z) then
Write (x)
Else
Write (z)
endif
else
Write (t)
cndif
;( ~ 1.+1
,~ t·!
Goodwork!,I!
end while
write ('bye')
:End
K+
I<-i-' ~
p~ k-: .' c ,<f-.;/ p~ 4(4 ~,
Q:/~:. __..
;, :. ,;,
SuctIon II
d) None of them
,
1
v_~
o
h) ESSt:Jlli.a1 for {hl~ fHnc!ioHing of lh~ l.:ompUler :/'
b) Memory management
, ,
c) File mnnagemenl
a) XY+l
"0, None oflhem
b) Xl' "
c) x~ y .1
EXCTcisc 2: Respond by true or false and correct if necessary : (5 points)
d) xy+xz+z
a) The component of the proccssor which commands the operation of read and wrile IS
,~ Q4) Oft 4 bits, using the signed convt::miOll. the biggest positive number that can be coded is ; the arithmetic and logic unit.
;I) +8 , b) On 5 bits, the biggest number Ina. I!an be coded is 32.
'\>' +}
c) HTML language is a programming language allowing to create progrums on [Ilternel,
c) ....7
d) The BIOS is responsibie of the interaction bl:lween human and machine.
d) +4
e) As operating systems. we can quotc two which arc; Microsoft oroce and Google
chrome.
(5) The number J II in decimal eom;sponds !o :
Exercise .3 (5 points): Complete the sentence by the corresponding word from tllose
at 1t I in bln<lry
1 proposed below:
h) 3F in hexad~dmal \
C) l57ln oclal V'" ., Jr'1"
\ ."~. ';,
/, s~FTP protocol" SMTP protocol, IP protocol, ~ser
aj None. cTthem
\ ' ,..,~• .( ',j a) A' ___ ~al1ows to access web pages on Internet,
(">--- Q6) Whal is DN!:! ?
, , , ., b) The .- ~is used in the transfer of e·malls,
n) A server pJaying Ihe role of J directory (f}omain Name Server) ,\ c) To transfer flies from a ..:1ient to a server, we usc the
b) A dYnElmic site for nelwork security (Data Nelwork Security) It ,
, ),,""
d) A computer which offers services to olhers is a __ ~
e) The ~ __ allows to idenlify a machine over lnternel in a unique mannCL
('.1 A data server cftypc cncyclopedin Wiid (Data Network Sciences) \
' - - ---..
Q7) To which type cf'Scrvice we en!) lIcce.~5 with thc pWlocol imp?
,,) Chatting '\,
.' We wish to realize a logical cireuil: ofa security :system ror a house which consists in alogiCflI
function with 2 outputs: one for 1he main gate (variable noted mg), and the other for the
b) E·mail manar;,emenl
parking gate (variable nOled p{!,), The main gate can close if jill the windows l'lte closed and
Loading web pagcs /
Ihe television and the heater are turned off, Of, if at leas! a window is opcn and the lelcvlsion
, ~1/4 or· the heater are turned on, 1n the other eases, the main gate cannOI dose (so stays in !he
"
" )(\T
K>..
:~:Y:';;,!,--~~
. ,,"'~.<';'
""' :
'1:1:'; "open"). Tilf: [nrking gatt c:.n 0p'.!n 1(111.: rn;~m £G[t: orllle LOU$¢ is dosed and ifth,~ car
~$ lUrncd 0:), In ,lit.: other cases, the parking g:w: call1l01 open {so still'S in the $1.11(: ({ close »). Exercise 6: Algoritnni and Programming (10 poinis):
- : the fa- in an incilisive or arul 1I0t \.!xdl.l~iv(;', a} Write an algorithm whicb allows Ille user to' enter 3 integers and propose to h;m 3
operations: average, sum, or asce[tding sorL At the end of each chosen operation, the program
:) Identify ~lle input Uook:m v:1nablr:s ior ~'::dl QU,pu: mg lind pg, ;lnd describe ror c;lJch ask~ the user for another operation. If the user choose no, the program cnds, if he choos\: yes,
input and ompul variable thi,; sl:Hc "I" rUle thl: 51tl!e '"0". the program propose to him th(: operaliom and Ireals its choke This funclioning conlinuc~ as
b) Give th~ trulh table (or nlg and pg, much as the user wants to: do operations. An example of execulion is given below;
c) Dliducc .he Sum ofpNJulIc! (SOP) ror mg. imd pg.
Rnter 3 integers: 12
!':xcrcisc 5: Algorithm flO lloiIlt$l 5
Give the \r;\ce and res-ult oflh<! following algorillllH" 7
Choose Ihe operation to do (1 for sum, 2 for average, J for asccnding sorf) : 2
<I) Algii Tesl Tbe average is : 8
Val'lnhlcs I,j ; inh:ger
Do you want another operation? (yIn) : y
Begin '
Choose tne operation to do (1 for SUIU.:2 for ;lvenlgc, J for ascending sarI) : :1
j{,-O
The rcsult of nseending sort is : 5 7 12
For i going frorl! 1 to to by step +3 Do you want another operation? (yIn) : n
if (i moul ""0) thcl1 ,
j~ ,j+1 b) Traduce lhis algorilhrn in a progrnmming language fha\ you know.
write{i) /
cndif
J~j+l
.I
Exercise 7; HTML (10 points)
cndfor
end
Write the HTML code for the following page: ,
b} Algo Tcstl
S~~· '!401J{)
"'''..rt'''~
wrilc (yes)
L~"':FI1~~~tnfAW~ ~;;':;;;;iHI~,o .:~~
cndi!
xf-x-I
cml
Gaud WorA!
Pilgll 3/4
Paee 4/4
.
~J~
,
(~
:.;:. k,jr',
", .;.~.
If",
--::t::.::· . >;;:~:::-.
r
";';'" .";~ -. ,"~,','G" ..
.
rj--~---"'- .
,
IJ LEllANESE. UNIVERSITY
Fac:u1ly .of Economics & Business AdininislrntiOfl - SIl
I, .~<; e p. i/oi.2 :-. Computer Gcnerallnfonnation-
:
..Qll.: Which of the foUowing is an ... dnpleo(;J top-k>vd domain name?
1 .4.) .cd!! B) [11' q WW'\.... 0) http://
A) R r:.: x 2
U) E R + 10
C) If 13 is truC' then oR = I}
0) EIseB#>B+ IO
A) HJe
il) name
C) <lddress
O} emaii
Fori 1105
L=-S
Z'" Z+ J
cnd
/I) 1
B) 5
C) 10
D) 25
E) lR
015.5"0
for N lto 5
5 S+(N'(N'I))/2
end;
<1JSpJay 5
i..'
~ (8 ·Vol~~L$1 it~ provld,,' ~·Jku!;lh()11 dd;)ib:):
\':.
J. \'\lh:d is'ill ·.;nur'hb whid, '$ \'Vflttcn in hinary: lOHH010101010Hl (5 poin:!.)
,.N
L. !~!:rrcsf.?"l\j Lhenumt...'f "'7642 In lm',ll)' ;md i"K"xadt'GlIlal (~polnb)
c. Convert lonet.,)
LEBANESE UNIV£ltSDY
C) A communical1on protoLu/
OJ An Ethernet netwOrk
QI, A . _~~_ is:t group of two DI" more <-"Om/?Uters (or nodl!S) that :Ire configured to :;h"re inforn1atioo and resources.
A} Router
8) Hub
C) Neh·,.o,k
0) D",tab~
Q-L You t::an <.:omprcss and decomprc'S)'; files uslng Spt.Xi;1hzc-d utiHtk:s :,uch a~ _ _ _.
A) WinZip
B) Oeitagrncntcr
D) Oeanup
BJ UNIx
C) service pr0f,'TtuTls
D) operating sy$te-m.~
E) EflCJ)fC
DJ TCP
@ T~ us~ th~ analog t~i"~p.hon~.~Ystcrn (Of $(ending d igll ill d;)I~'" you mtlq nb" esc" '~..._~...'~ In ordt'f 10 convert OJ IlH':'S$age
from digItal Jy::,~a!og ..;;dViC(> ver:;>::<.
A) hub :: ~~~-
B} n'iodun ~ -- "
~/:"".;~
',,~, ','""
QJQ" i\ (n) _ _. ___ ITan.<;b1;-.,<;;) SOun:,~ (·Out.' lHln:m e).:<x\ll:lble program.
A) Editor '-5'"
13} Compiler
C) fJlHiJalor
0) lnlerpr('{<.'r
,.