Jovian
⭐️
Sign In
In [1]:
a=int(input("Enter a no"))
i=1
for i in range(a,-1,-1):
    print(i)
Enter a no10 10 9 8 7 6 5 4 3 2 1 0
In [7]:
a=[1,2,3,45,6,78,67]
b=[]
for i in a:
    b.append(i)
print(b)
    
[1, 2, 3, 45, 6, 78, 67]
In [6]:
b=[]
b.append("skjbis")
print(b)
['skjbis']
In [11]:
for i in range(1,11):
     print(i)
print(i)

1 2 3 4 5 6 7 8 9 10 10
In [12]:
a=[1,2,3,4,5]
sum=0
for i in a:
    sum=sum+i
print(sum)
15
In [13]:
5>7
Out[13]:
False
In [16]:
for z in a:
    print(z)
print("something")
1 2 3 4 5 something
In [18]:
a=7
Out[18]:
False
In [19]:
4>8
Out[19]:
False
In [21]:
a={"name":"shakti","age":22,"weight":45}
a["age"]
    
Out[21]:
22
In [27]:
s="sdhb"
i=5
print("string is {one} int is {two}".format(one=s,two=i))
string is sdhb int is 5
In [28]:
a=5
if(a<4):
    print("true")
else:
    print("false")
    
false
In [30]:
a=5
print(int(a/5))
1
In [1]:
import jovian

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