Sie sind auf Seite 1von 1

1.

SupposethecoverpriceofabookisRs.200,but
bookstoresget
a25%discount.
ShippingcostsRs.40forthefirst
copyandRs.10foreachadditionalcopy.WriteaPythonprogramtocalculatethetotalwholesaleco
st
for60copies.[8Marks]

2.
Anumber,
x,isapowerofyifit
isdivisiblebyyandx/yisapowerofy.Writeafunction
inPythonthat
takesparametersxandyandreturnsTrueifxispowerofy.[8Marks]

3.
WriteafunctioninPythonthat
takesthreeparametersa,b,andcandreturnstheirgreatest
commondivisor.[8Marks]
4.
WriteaPythonscript
that
readsthecurrent
timeandconvertsit
toatimeofdayin
hours,minutes,andseconds,plusthenumberofdayssincetheepoch.[8Marks]

Das könnte Ihnen auch gefallen