Jovian
⭐️
Sign In
In [ ]:
a=lambda f:f+10
print(a(2))
In [ ]:
s=lambda a,c,b:a+b*c
print(s(1,2,3))
In [ ]:
def su(n,s):
    return lambda n,s:print(n+s)
triple=su(2,6)
print(triple(5,6))
In [ ]:
print(pow(6,2))
In [ ]:
s=lambda a,b:pow(a,b)
print(s(3,4))
In [ ]:
print(4**5)
In [ ]:
def sum():
    global s
    print(s)
    s="learning"
    print(s)
    
    
s="Python"
sum()
In [ ]:
 
In [ ]:
li=[]
for i in range(1,6):
    num=int(input("enter a number"))
    li.append(num)

maximum=li[0]
for i in range(0,5):
    if(li[i]>=maximum):
        maximum=li[i]
print(maximum)
In [ ]:
li=[]
maximum=0
for i in range(0,5):
    num=int(input("enter a number"))
    li.append(num)
    if(li[i]>=maximum):
        maximum=li[i]   
print(maximum)
In [ ]:
a=int(input("Enter a number"))
In [ ]:
try:
    a=int(input("Enter a number"))
    if a>0:
        flag=1
        for i in range(2,a):
            if a%i==0:
                flag=0
        if flag==1:
            print("prime")
        else:
            print("not prime")
    else:
        print("invalid output")
except ValueError:
    print("Invalid Entry")
    
In [3]:
n=int(input("enter a num"))
def armstrong(a):
    a=0
    temp=n
    while temp>0:
        digits=temp%10
        a=a+digits**3
        temp//=10
    if n==a:
        print("is armstrong ")
    else:
        print("not armstrong")
armstrong(a)
enter a num153 is armstrong
In [5]:
n=int(input("enter a num"))
a=0
temp=n
while temp>0:
    digits=temp%10
    a=a+digits**3
    temp//=10
if n==a:
    print("is armstrong ")
else:
    print("not armstrong")

enter a num66 not armstrong
In [1]:
import jovian
In [ ]:
jovian.commit()
[jovian] Saving notebook..
In [ ]: