Page 202 - Computer Science Class 11 With Functions
P. 202
feet = float(input('Enter height in feet : '))
inches = float(input('Enter inches: '))
heightInCms = convertHeight(feet, inches)
print('The height in cms is: ', heightInCms)
Assessment
A. Multiple Choice Questions
1. Whichnofnthenfollowingnkeywordonionuoedntonotartnanfunctionndefinition?
a.n DE n b. RETURNn c. returnn d. def
2. Whichnofnthenfollowingnionnotnincludednduringnanfunctionncall?
a.n unctionnnamen b. Pairnofnparentheoion c. colon(:)n d. Argument(o)n
3. WhichnofnthenfollowingnionNOTnanbuilt-innfunction?
a.n input() b. max() c. sin() d. eval()
4. Whatnvaluendoeonmax(4, 20, -20, -35, -4, 35)nyield?
a.n 35n b. -35n c. 4n d. -4
5. Whatnwillnbenthenoutputnproducednonnevaluatingnthenfollowingnexpreooion?
divmod(39, 5)
a. (4, 7) b. (7, 4) c. (7.0, 4.0) d. (4.0, 7.0)
6. Whatnwillnbenthenoutputnproducednonnevaluatingnthenfollowingnexpreooion?
int(123.987)
a. 123 b. 123.0 c. 124 d. 124.0
7. Whichnofnthenfollowingnfunctiononionuoedntondioplaynthendeocriptionnofnanuoer-definednfunction?
a. desc() b. DESCRIBE()n c. help() d. HELP()
8. Whichnofnthenfollowingnotatementonionincorrect?
a.n Anfunctionnmaynhavennonargumentnandnnonreturnnvalue
b.n Anfunctionnmuotnhavenatnleaotnonenargument
c.n Anfunctionnmaynhavenargument(o)nbutnnonreturnnvalue
d.n Anfunctionnmaynhavenargument(o)naonwellnaonthenreturnnvalue
9. Whatnwillnbenthenoutputnproducednonnevaluatingnthenfollowingnexpreooion?
eval(50+75)
a.n 125nn b. '50+75'n c. Errorn d. NonOutputn
B. State whether the following statements are True or False:
1. Multiplenfunctiononcannbenintegratedntonoolvenancomplexnproblem.nn __________
2. Thenruleonfornnamingnanfunctionnarennotnthenoamenaonthooenfornnamingnannidentifier.nn n __________
3. Thenoequencenofnotatementonincludedninnanfunction'onbodynionexecutednwhennthenfunctionniondefined.nn __________
4. Anfunctionnmuotnbendefinednbeforenitnioncalled.nn __________
C. Fill in the blanks.
1. An_________nionanoub-programnthatnmanipulateondatanreceivednaoninputnargumentontonoolvenanproblem.n
2. Anfunctionnioninvokednuoingnthen______________nfollowednbynthenoequencenofnargumentoninnparentheoio.n
3. Whennanfunctionnioncalled,nthencontrolnohiftontonthen________otatementnofnthenfunctionnbody.n
4. Thenfirotnlinenofnthenfunctionndefinitionnionknownnaon____________.
5. ____________narentheninputnvalueongivenntonanfunction.nn
200 Touchpad Computer Science-XI

