Python With Avirup

Python With Avirup

Share

Python. Python is widely accepted as the best programming language for beginner developers as it is simple and easy to use and deploy.

It is widely used to build scalable web applications. Python is one of the most loved programming languages by developers, data scientists, software engineers, and even hackers because of its versatility, flexibility, and object-oriented features. ... Although it's a high-level language and can do complex tasks, Python is easy to learn and has a clean syntax.

21/02/2021

>>>
>>> dictionary={"key":"value"}
>>> print(dictionary["key"])
value
>>> d={"a":[1,2,3],"b":(4,5,9),"c":"value","d":1}
>>> print(d["a"])
[1, 2, 3]
>>> print(type(d["a"]) )

>>> print(d["b"])
(4, 5, 9)
>>> print(type(d["c"]))

>>> print(d["d"])
1
>>> print(type(d["d"]))

>>>

31/12/2020

>>> import calendar
>>>a=calendar.TextCalendar(calendar.SUNDAY)
>>> n=1
>>> while(n>>

22/12/2020

>>> from user
>>> day=input("enter day:")
enter day:"sunday"
>>> if(day=="monday"):
.. print("today is working day")
.. elif(day=="tuesday"):
.. print("today is working day")
.. elif(day=="wednesday"):
.. print("today is working day")
.. elif(day=="thursday"):
.. print("today is working day")
.. elif(day=="friday"):
.. print("today is working day")
.. elif(day=="saturday"):
.. print("today is half working day")
.. else:
.. print("today is holiday")
..
today is holiday

21/12/2020

>>> if
..
>>> x=[10,20,30,40]
>>> if(len(x)>1):
.. if(10,20 in x):
.. print(x)
..
[10, 20, 30, 40]

20/12/2020

>>> x=3
>>> if x==2:
.. print("x is equal to 2")
.. elif x==3:
.. print("x is equal to 3")
.. else:
.. print("x is not equal to 2 & 3")
..
x is equal to 3
>>>

19/12/2020

>>> range function using for loop
..
>>> for i in range(2,10):
.. print(i)
..
2
3
4
5
6
7
8
9

19/12/2020

>>> range function using for loop
..
>>> for i in range(5):
.. print(i)
..
0
1
2
3
4

18/12/2020

>>>
..
>>> a={1,2,-5,2.1,"hello"}
>>> print(a)
{1, 2, 'hello', 2.1, -5}
>>> print(type(a))

>>> is immutable object,set does not maintained position number.

17/12/2020

>>>
..
>>> a=(10,20,-50,21.3,"hi")
>>> print(a)
(10, 20, -50, 21.3, 'hi')
>>> print(type(a))

>>> print(a[0])
10

17/12/2020

>>>
..
>>> a=[10,20,-50,21.3,"avirup"]
>>> print(a)
[10, 20, -50, 21.3, 'avirup']
>>> print(type(a))

>>> print(a[0])
10
>>> print(a[1])
20
>>> print(a[2])
-50
>>> print(a[3])
21.3
>>> print(a[4])
avirup
>>> a[0]=90
>>> print(a)
[90, 20, -50, 21.3, 'avirup']

17/12/2020

>>>
..
>>> a=20
>>> b=6
>>> c=a//b
>>> print(c)
3

17/12/2020

>>>
..
>>> a=20
>>> b=6
>>> c=a/b
>>> print("required floating number",c)
required floating number 3.3333333333333335

Want your school to be the top-listed School/college in KOLKATA?

Click here to claim your Sponsored Listing.

Location

Website

Address


Kolkata