Python Assignmnent 2
Python Assignmnent 2
Code
Print ("nye)
unbella
an lunthella )
Drint ( no hced t
înnt (ye )
Cutut
Ss it rainiy?(Va/to): Yes
Drint (Gade A
-Extelent")
Drint (" arade: s - Goad)
Print (iade;e - Arerag)
Outpet
() Enter yawn Scor : 5
( wre a
4hat tahes an
Usen wheath the numba ig intger inpt from
mum e lnt ( odd the vsen Cnd
inpu ("Enten an o eve
num 2 0 ntsger;^)
(i)Entn an htger;y
(U) Ento an
5 otd. 'Lateyen:
Name:
Regd. Number:
Departiment of GOmputor Science &
Baculty of
Engineering &TechnologyEngineering
(ITER)
rint
Output
Entn a nlumbn
Engineering
Science &
Department of Computer (ITER)
Faculty of Engineering &Technology
rogran
Complee
Quetim Write a nunbe
eh -he previus iaput
Q. User
Prcime unber hclow
Sel:
def ierone (n):
i(ntb05)+ :
for i in nange (2,
rekurn faloe.
retuu tue
lnit int (input ( Enton a Nmb)
age (2, nit)
Outut
Enten a numben s, 20
ese:
Output
(0 tor5
Ertey a oste Al bmben. s
The rtes t i8 25 The reelt s .
Wri a
roambf ke nemaiaden when a U
sen
y :
nums id (input ("Enten an integen: )
metch num .5:
Case o:
Pris (f "The nemahden when fnumy ig diial ed
Cese 4:
rit (f The remaider when fnum i) div ided by 5 i)
2)
Pruns (+'The riemainden when fhum} i8 dirided by 5 ih
Case 3.
Prind (f" he tenender when nun? is diided bys 3
lwkite rue:
expn i^pt ("Enten Zwo numbens end an openadd tei? to
Qut:")
hneen
Mean; 3:
Med?an: 40
(49
ese:
dis cound
seas on : "yes':
Cast s O:&5
Ogelhy- memben
tTinat Cost aften d's cont
Snalosts Cost * Cl- dis Crud)
(utpt
rlom ype (sandand / eare/ Suie);debre.
Enten a numbas: 6
6 i a penfect alun ben.
()
print (t end )
Count 1
¿Caut o 0
rint)
Outpat
|26
I55 I66 I6
130 3 145 150 5Y
|44
Sa
ded is fuctniad (n):
whilk feet n
stehern faet sn
homs i t (input ( aEnten a numbon", D)
1f i.factrial Cnun):
rnt {'Snumy ) factut al numben )
else
frant (s"fn un iy not a tuctrtal onben )
Outeut
tntn
|20 a tectotal numben .
"))
mum s int ( input ("Enter a numben
whbe num > 10:
num s
Entei a
2
<The Single olisit Sum i ;
Enten e Numben: 123y
The Side- diqít Sumis : 1
Regd. Number: