Jovian
⭐️
Sign In
In [ ]:
a=3
b=4
print("The Value of a is {one} and the other value is {two}".format(one=a,two=b))
In [ ]:
print("the value of a is",a)
In [ ]:
a=1
b=1
print(id(a))
print(id(b))
In [ ]:
a=[]
a.append(1)
a.append(2)
a
In [ ]:
a=[1,2,3,4,5,"sun"]
a
In [ ]:
a[0]=2
In [ ]:
a
In [ ]:
a=(1,2,3)
In [ ]:
a[2]=3
In [ ]:
r=list(a)
In [ ]:
r
In [ ]:
a=tuple(r)
In [ ]:
a
In [ ]:
a=()
In [ ]:
a
In [ ]:
a=(1,2,3)
r=list(a)
In [ ]:
a
r
In [ ]:
a
In [ ]:
a=(1,3,[1,3,4])
a
In [ ]:
a=(1,2,3,[2,3,4])
a[]
In [ ]:
a
In [ ]:
a={1,2,3,4,"sun"}
In [ ]:
a
In [ ]:
di={"one":1
  ,"two":2,
  "three":3}
di
In [ ]:
di["two"]
In [ ]:
di["four"]=4
In [ ]:
di
In [ ]:
di["four"]=6
In [ ]:
di
In [ ]:
di.values()
In [ ]:
a=int(input("Enter a number"))
In [ ]:
a=int(input("Enter a no"))
b=input("Enter a no")
c=input("Enter a no")
arr=[]
arr.append(a)
arr.append(b)
arr.append(c)
arr
In [ ]:
n=input("enter a string")
q=n[::-1]
if n==q:
    print("palindrome")
else:
    print("not")
In [ ]:
for i in range(1,6,1):
    print(i)
In [ ]:
lis=[]

for i in range(1,6,2):
    num=int(input("enter a number"))
    lis.append(num)
lis
In [ ]:
arr=[1,4,6,7,9]
for i in arr:
    print(i)
In [ ]:
arr=[1,2,3,4,5,6]
a="s"
b="sun"
if a in b:
    print("Yes")
In [ ]:
for i in "Something":
    print(i)
In [ ]:
a=input("Enter a string")
for i in a:
    if i not in "AEIOUaeiou":
        print(i)
In [ ]:
def add(a,b):
    sum=a+b
    return sum
sum=add(1,2)
print(sum)
In [ ]:
def add(a,b):
    sum=a+b
    return 0
sum=add(1,2)
print(sum)
In [8]:
n=int(input("enter your number"))
count=0
for i in range (1,n+2):
    if n%i==0:
        count=count+1
print(count)
if count==2:
    print("prime")
else:
    print("not prime")
enter your number5 2 prime
In [9]:
n=int(input("enter your number"))
count=0
for i in range (2,n):
    if n%i==0:
        print("its notprime")
        break
else:
    print("its prime")

enter your number5 its prime
In [14]:
for i in range(1,4):
    print(i) 
    break
else:
    print("in else")

1
In [15]:
import jovian

In [ ]:
jovian.commit()
[jovian] Saving notebook..