#WAP GREATYEST NO. IN FOUR NO.
a=int(input("enter first no.:-"))
enter first no.:-55
b=int(input("enter second no.:-"))
enter second no.:-66
c=int(input("enter third no.:-"))
enter third no.:-33
d=int(input("enter fourth no.:-"))
enter fourth no.:-13
if (a greater than b and a greater than c and a greater than d):
print("greatest no. is:- ",a)
elif (b greater than c and b greater than d):
print("greatest no. is:- ",b)
elif (c greater than d):
print("greatest no. is:- ",c)
elif( d greater than c):
print("greatest no. is:- ",d)
else:
print("Either any two values or all four values are equal")
OUT PUT
greatest no. is:- 66
#WAP SUM OF NTH NO.
n=int(input("enter limit"))
enter limit5
s=0
for c in range(1,n):
s=c+s
print("the sum is",s)
OUT PUT
the sum is 1
the sum is 3
the sum is 6
the sum is 10
In questa pagina del sito puoi guardare il video online Python Tutorial -2 | Learn Python Programming della durata di ore minuti seconda in buona qualità , che l'utente ha caricato RABIUL ISLAM Official 28 maggio 2024, condividi il link con amici e conoscenti, su youtube questo video è già stato visto 43 volte e gli è piaciuto 5 spettatori. Buona visione!