>>> num • !.nt (input (" Show the [Link] cable of?
" ))
Show ~he multiplication table of? 16
>>> ; using for loop co iterate [Link]~iplicatton 10 [Link]
for ~ in ranqe (l , 11) :
nP,~~
. ••lii,&,i-kl •v• I i , · - · I:.
. - - .... ••""- ,~H-. I• -H-~l.)
;--.......
lS
18
X
X
l
-18
2 == S6
lS .... 54
--
X 3
18 X -i 72
lS
18
lS
X
X
s
6
7 =
- 90
108
126
--
X
!.8 X e !.'4~
18 X 9 162
13 X ?.O
>>>
- !.80
num_
-- -
int (input ( "Enter fJLrst [Link]:r rr ) )
num2 -- 1nt (1nput ("Ent:er second nwr~er" ))
num3 - _nt ([Link] ("Enter [Link] number" ))
if (nwnl >~ num2) (nwn_ >= num3) :
largest:= numl
( num2 >= numl) (num2 >= num3) :
largest= num2
•
•
largest - num3
print ( "The largest number JLs" , largest)
I
Enter first numb r ~O
Enter second nuir~er 8
Enter third numlJer ~2
Th,e la:rgest number 1.s 12
>>>
print ( 11 it1e • come to c .e ge,: t:o k:no · you program" )
name • input ("ih c 1 your nam~. " )
age = int (input ( " hat i yo rage?" ))
age >= l6 :
print ( "You c n drive a car" )
print (name)
print (" ic~ to meet yo ")
t:o t:he
ye l.S
Wbac 1s yon:r
can ca:r .
?~1Ct! C ec y u!
I
num l = int (.:..nput ("E nte r fJL rst nuin ber" ))
num 2 = _nt ( _n1:.ut ( nEn te:r sec ond num ber" ) )
num 3 - [Link] ( [Link] ut ( 11 Ent er t __ _ rd num ber" ) )
(num _ >= num2) n (num l >= num 3) :
lar ge st= num l
(num 2 >= num l) (num 2 >= num 3) :
lar ge st= num2
••
lar ges t - num 3
1:tr 1nt ( ' 'Th e lar ges t num ber is" , lar ges t)
I
En ter fir st n,1u mib er _ o
En ter sec on d num ber 8
En ter cb ird num ber l2
Th e lar ae
- st num ~er is 12
-
>>>
6:: ~ I Ii flprt I"en·el"
~ -■■ 'rl \ -·· i&'rl •• 'J - ~
j Ti.. iu•.-,\•,Q
wuu 1·" ... ll
factoriai =1
if a<J:
~;~t I\ no~rru
P.... ~- - JI.t~
u. r.rrir1 1~' rnni e11u1·3t fr,. ri~,eg~-.1:ve n·wt~\.
. ~•-· ·:- 1 d,~ u; i 1T·~~1-•rl )
- ~'-' ••• ,J ',J ••• '-' · ..
1
elif a=O:
p::i~:t (11 ttte factorial af j is :II )
el3e :
for i .n range (~, atl) :
factoria:=factor:a:*:
P f r: rfn
~• i•••f! t I\ II t'J tiu•p -,.~ 1111J tJ r• • ~~ 1· • ,
I~
JJ. f
n1·i,}Cl II f fa Ct Or• 1·a,• )
Pl ease enter any Number to find factorial : 4
1
The factorial of 4 = 24
a=int (inpJt ("enter fi:ac no n))
b=int (input (nente: seco:d ~o fi ))
~ int (input (rrente: t:ird no'1))
i: a>b:
if a>c:
print ("the greatest :o is:",a)
else :
print ("the greatest ~o is:",c )
else :
if b>c:
print ("the g:eatest lo is:",b)
else :
priJt ("the g:eat~st no is:",c)
Encer che firsc number : 6
,Encer che second n 11rnber : 6
'E nce1: che chiz:d n ~unber : 4
F11:s1: fiiu:irnber : 6. c~, 1.s greacesc
>>> I