pionyrpaperirn
PAGE NO
pyhon program hat aks he user
O Wrie a PAtho
tox hin hame andHhen elcomes im
name z input("KOhat Psis youY hame )
print ("" Jelcome + hame t " )
Tnput
what fs oUY hameSail Ho ssaln
Dut puti
Weleomee
Jte a progam that accepts principle.
Tate and imom tae user and print he
Simple Tnderest
princpal toat Cinput ("nter he princkpal munt
time tloat (input("Snter te time ; ")
&imple-interet)
print" Smple In terey ici
ptoneorpapgr in
PAGE NO
Tnputi
Enter he principal amount i L000
Enter the nade a in terest :6
Entey he time
Qutpyt:
Simple Intereyt is : 100.0
(3rite a Bython progYam that prompts the user to
nput prinople, rata, and tine amd caculate compound
nteres
princip foat (input(Entex the principad amount; ")
mate a qloakwinput(ntey the annvad tnterest rao i ")
n a tloat(nput ("ndoy he time: ))
amount 2 principal (lt rate/io0) ** time
Compo und-interet a ambunt- prinolpa
print (" Compound Tnteret fs " Compound inteet)
)
nter the principad amount:000
Endey he annua interest ratei 6
Ente Hhe time
CÝmpount Intavet fs 205-0)
proyam in Bython to cocylol hy ny
and pavima tey
Ctangles nd cirehes.
print"Choase a chape ")
print n3. Civcle)
chotce a input ("Snter youY Chotce ('/2 /3): ")
base qloat (input (" Grder bane : ")
height loat (input ("&hter he'gut: ")
a : jloat(Input ("Ender aside a' ")
b tlaat (input ("EnteY Side b:
e /laat (input ("GnteY aSide c : ))
print ("Aea 9, triongle, Area)
print ("PeximeAY 4, tianglei perinettr)
elih chatee
kngth Hoat (input ("&nter angdh: ")
pioncoiperin
FAGE NO
pertmetr (ength
print ("Ara A, rectanglei area)
prlnt ("perimeier a, reAamgle perimerer)
radiusklat Cinput ("Entex madius:))
pi
perimteY
pxint ("Area o circlei" ana)
print ("Rerimatex , cel:" perimeer)
print ("3nvaliol cheice")
Ingut
chosse a ghape
Trienge
Endes or chotce (2/3):3
Sater adis;
Qutput
Avea o, cirele I54.0
ferimeter h cirele : 44.0
pionoorpaperin
PAGE NO
Write a progmom in Python to input 3 nurn bars
sepurated bó comma, amd gind he brget and
malet among dhem
aib,c zinput ("Enter 3numbexs sepata by comma. ")»gey
b flbat (b)
Rloat c)
laxqot a max (aib,c)
Snallet 2 min(aibc)
prlt ( Smalldt numbey is:" malle)
cnder 3 umbeK Separato by Commasi I2, 6,9
Qutpyt
numbe isi Q.0
Smally nymbey is: 6.0
R
ite a proam in Rython to gind the rots o
uadratfe esuation uaing Dytlon:
a: loat Cnput(nder coe Eftofonke a: "))
b: jloat(input ("EnteY coegtetent b: )
e float (input ("Sntex coeeleat e i ))
de b**2- 4 a*c
r00dQ-b-d**o6)/2a)
print ("Roots ane eal amd deren.")
print ( Root I= " nook)
print ("Root a , 0 )
prlnt c" Roots ane neal and eayal)
print u Roet 2 rOot)
(abs (a) ** 0.6)*a)
print "Roots ane complex")
print("Root2-:28- :4yi" tormat(real,inng)
AGE NO7
Tneut
Enter coto°clent a:l
Cnter coehtelew bi-3
Enter coicient
Ootput
Roots ane ral and
Root l Q.0
deyserent
Root 2 lo0
Wrtea program Sn Rython to print all prim
numbeTS unsiolo Tamge d numbers provided b
Start afnt (input"Ender stort Arange i
"))
end : ind ((nput("nteY end o, Yan': ) )
num in Tnge (start end+):
for i in Yange (a, tm int(mum **s)+):
oreak
R else
Pein (num)
pioneerpaperin
PAGE NO
Toeyt
nter Hhe asdart rangei
Cnter the end range'; a0
Qutpute