Python code for revise with explanation.
- Get link
- X
- Other Apps
Hello World
salman khan
File "<ipython-input-3-0713073d8d88>", line 1 print(salman khan) ^ SyntaxError: invalid syntax because salman khan is a string so print error.
7
7.7
True
Hello 1 4.5 True
Hello/1/4.5/True
hello world
hello-world
2. Data Types
8 inf
8.55 inf
True False
Hello World
(5+6j)
[1, 2, 3, 4, 5]
(1, 2, 3, 4, 5)
{1, 2, 3, 4, 5}
{'name': 'Nitish', 'gender': 'Male', 'weight': 70}
list
3. Variables
nitish 11
5 nitish
1 2 3
1 2 3
5 5 5
Comments
10
4. Keywords & Identifiers
Nitish ntiish
Temp Heading
5. User Input
Enter Emailnitish@gmail.com
'nitish@gmail.com'
enter first number56 enter second number67 123 <class 'int'>
6. Type Conversion
10.6 <class 'int'> <class 'float'>
--------------------------------------------------------------------------- TypeError Traceback (most recent call last) <ipython-input-57-72e5c45cdb6f> in <module> 3 print(type(5),type(5.6)) 4 ----> 5 print(4 + '4') TypeError: unsupported operand type(s) for +: 'int' and 'str'
4.0
7. Literals
3.14
This is Python This is Python C This is a multiline string with more than one line code. ๐๐๐คฃ raw \n string
a: 5 b: 10
Program exe
Operators in Python
- Arithmetic Operators
- Relational Operators
- Logical Operators
- Bitwise Operators
- Assignment Operators
- Membership Operators
In [ ]:
# Arithmetric Operators
print(5+6)
print(5-6)
print(5*6)
print(5/2)
print(5//2)
print(5%2)
print(5**2)
11
-1
30
2.5
2
1
25
In [ ]:
# Relational Operators
print(4>5)
print(4<5)
print(4>=4)
print(4<=4)
print(4==4)
print(4!=4)
False
True
True
True
True
False
In [ ]:
# Logical Operators
print(1 and 0)
print(1 or 0)
print(not 1)
0
1
False
In [ ]:
# Bitwise Operators
# bitwise and
print(2 & 3)
# bitwise or
print(2 | 3)
# bitwise xor
print(2 ^ 3)
print(~3)
print(4 >> 2)
print(5 << 2)
2
3
1
-4
1
20
In [ ]:
# Assignment Operators
# =
# a = 2
a = 2
# a = a % 2
a %= 2
# a++ ++a
print(a)
4
In [ ]:
# Membership Operators
# in/not in
print('D' not in 'Delhi')
print(1 in [2,3,4,5,6])
False
False
In [ ]:
# Program - Find the sum of a 3 digit number entered by the user
number = int(input('Enter a 3 digit number'))
# 345%10 -> 5
a = number%10
number = number//10
# 34%10 -> 4
b = number % 10
number = number//10
# 3 % 10 -> 3
c = number % 10
print(a + b + c)
Enter a 3 digit number666
18
- Arithmetic Operators
- Relational Operators
- Logical Operators
- Bitwise Operators
- Assignment Operators
- Membership Operators
11 -1 30 2.5 2 1 25
False True True True True False
0 1 False
2 3 1 -4 1 20
4
False False
Enter a 3 digit number666 18
If-else in Python
In [ ]:
# login program and indentation
# email -> nitish.campusx@gmail.com
# password -> 1234
email = input('enter email')
password = input('enter password')
if email == 'nitish.campusx@gmail.com' and password == '1234':
print('Welcome')
elif email == 'nitish.campusx@gmail.com' and password != '1234':
# tell the user
print('Incorrect password')
password = input('enter password again')
if password == '1234':
print('Welcome,finally!')
else:
print('beta tumse na ho paayega!')
else:
print('Not correct')
enter emailsrhreh
enter passworderhetjh
Not correct
In [ ]:
# if-else examples
# 1. Find the min of 3 given numbers
# 2. Menu Driven Program
In [ ]:first num4
second num1
third num10
smallest is 1
In [ ]:
# menu driven calculator
menu = input("""
Hi! how can I help you.
1. Enter 1 for pin change
2. Enter 2 for balance check
3. Enter 3 for withdrawl
4. Enter 4 for exit
""")
if menu == '1':
print('pin change')
elif menu == '2':
print('balance')
else:
print('exit')
Hi! how can I help you.
1. Enter 1 for pin change
2. Enter 2 for balance check
3. Enter 3 for withdrawl
4. Enter 4 for exit
2
balance
enter emailsrhreh enter passworderhetjh Not correct
first num4 second num1 third num10 smallest is 1
Hi! how can I help you. 1. Enter 1 for pin change 2. Enter 2 for balance check 3. Enter 3 for withdrawl 4. Enter 4 for exit 2 balance
Modules in Python
- math
- keywords
- random
- datetime
In [ ]:
# math
import math
math.sqrt(196)
Out[ ]:14.0
In [ ]:
# keyword
import keyword
print(keyword.kwlist)
['False', 'None', 'True', 'and', 'as', 'assert', 'async', 'await', 'break', 'class', 'continue', 'def', 'del', 'elif', 'else', 'except', 'finally', 'for', 'from', 'global', 'if', 'import', 'in', 'is', 'lambda', 'nonlocal', 'not', 'or', 'pass', 'raise', 'return', 'try', 'while', 'with', 'yield']
In [ ]:
# random
import random
print(random.randint(1,100))
88
In [ ]:
# datetime
import datetime
print(datetime.datetime.now())
2022-11-08 15:50:21.228643
In [ ]:
help('modules')
Please wait a moment while I gather a list of all available modules...
/usr/local/lib/python3.7/dist-packages/caffe2/proto/__init__.py:17: UserWarning: Caffe2 support is not enabled in this PyTorch build. Please enable Caffe2 by building PyTorch from source with `BUILD_CAFFE2=1` flag.
/usr/local/lib/python3.7/dist-packages/caffe2/proto/__init__.py:17: UserWarning: Caffe2 support is not enabled in this PyTorch build. Please enable Caffe2 by building PyTorch from source with `BUILD_CAFFE2=1` flag.
/usr/local/lib/python3.7/dist-packages/caffe2/python/__init__.py:9: UserWarning: Caffe2 support is not enabled in this PyTorch build. Please enable Caffe2 by building PyTorch from source with `BUILD_CAFFE2=1` flag.
Cython collections kaggle requests_oauthlib
IPython colorcet kanren resampy
OpenGL colorlover kapre resource
PIL colorsys keras rlcompleter
ScreenResolution community keras_preprocessing rmagic
__future__ compileall keyword rpy2
_abc concurrent kiwisolver rsa
_ast confection korean_lunar_calendar runpy
_asyncio configparser langcodes samples
_bisect cons lib2to3 sched
_blake2 contextlib libfuturize scipy
_bootlocale contextlib2 libpasteurize scs
_bz2 contextvars librosa seaborn
_cffi_backend convertdate lightgbm secrets
_codecs copy linecache select
_codecs_cn copyreg llvmlite selectors
_codecs_hk crashtest lmdb send2trash
_codecs_iso2022 crcmod locale setuptools
_codecs_jp crypt locket setuptools_git
_codecs_kr csimdjson logging shapely
_codecs_tw csv lsb_release shelve
_collections ctypes lunarcalendar shlex
_collections_abc cufflinks lxml shutil
_compat_pickle curses lzma signal
_compression cv2 macpath simdjson
_contextvars cvxopt mailbox site
_crypt cvxpy mailcap sitecustomize
_csv cycler markdown six
_ctypes cymem markupsafe skimage
_ctypes_test cython marshal sklearn
_curses cythonmagic marshmallow sklearn_pandas
_curses_panel daft math slugify
_cvxcore dask matplotlib smart_open
_datetime dataclasses matplotlib_venn smtpd
_dbm datascience mimetypes smtplib
_decimal datetime missingno sndhdr
_distutils_hack dateutil mistune snowballstemmer
_dlib_pybind11 dbm mizani socket
_dummy_thread dbus mlxtend socketserver
_ecos debugpy mmap socks
_elementtree decimal modulefinder sockshandler
_functools decorator more_itertools softwareproperties
_hashlib defusedxml moviepy sortedcontainers
_heapq descartes mpmath soundfile
_imp difflib msgpack spacy
_io dill multidict spacy_legacy
_json dis multipledispatch spacy_loggers
_locale distributed multiprocessing sphinx
_lsprof distutils multitasking spwd
_lzma dlib murmurhash sql
_markupbase dns music21 sqlalchemy
_md5 docs natsort sqlite3
_multibytecodec doctest nbconvert sqlparse
_multiprocessing docutils nbformat sre_compile
_opcode dopamine netCDF4 sre_constants
_operator dot_parser netrc sre_parse
_osx_support dummy_threading networkx srsly
_pickle easydict nibabel ssl
_plotly_future_ ecos nis stan
_plotly_utils editdistance nisext stat
_posixsubprocess ee nltk statistics
_py_abc email nntplib statsmodels
_pydecimal en_core_web_sm notebook storemagic
_pyio encodings ntpath string
_pyrsistent_version entrypoints nturl2path stringprep
_pytest enum numba struct
_queue ephem numbergen subprocess
_random erfa numbers sunau
_remote_module_non_scriptable errno numexpr symbol
_rinterface_cffi_abi et_xmlfile numpy sympy
_rinterface_cffi_api etils oauth2client sympyprinting
_scs_direct etuples oauthlib symtable
_scs_indirect fa2 ogr sys
_sha1 fastai okgrade sysconfig
_sha256 fastcore opcode syslog
_sha3 fastdownload openpyxl tables
_sha512 fastdtw operator tabnanny
_signal fastjsonschema opt_einsum tabulate
_sitebuiltins fastprogress optparse tarfile
_socket fastrlock os tblib
_soundfile faulthandler osgeo telnetlib
_sqlite3 fcntl osqp tempfile
_sre feather osqppurepy tenacity
_ssl filecmp osr tensorboard
_stat fileinput ossaudiodev tensorboard_data_server
_string filelock packaging tensorboard_plugin_wit
_strptime firebase_admin palettable tensorflow
_struct fix_yahoo_finance pandas tensorflow_datasets
_symtable flask pandas_datareader tensorflow_estimator
_sysconfigdata_m_linux_x86_64-linux-gnu flatbuffers pandas_gbq tensorflow_gcs_config
_sysconfigdata_m_x86_64-linux-gnu fnmatch pandas_profiling tensorflow_hub
_testbuffer folium pandocfilters tensorflow_io_gcs_filesystem
_testcapi formatter panel tensorflow_metadata
_testimportmultiple fractions param tensorflow_probability
_testmultiphase frozenlist parser termcolor
_thread fsspec parso terminado
_threading_local ftplib partd termios
_tkinter functools past test
_tracemalloc future pasta testpath
_warnings gast pastel tests
_weakref gc pathlib text_unidecode
_weakrefset gdal pathy textblob
_xxtestfuzz gdalconst patsy textwrap
_yaml gdalnumeric pdb thinc
abc gdown pep517 this
absl genericpath pexpect threading
aeppl gensim pickle threadpoolctl
aesara geographiclib pickleshare tifffile
aifc geopy pickletools time
aiohttp getopt pip timeit
aiosignal getpass pipes tkinter
alabaster gettext piptools tlz
albumentations gi pkg_resources token
altair gin pkgutil tokenize
antigravity glob platform toml
apiclient glob2 plistlib tomli
appdirs gnm plotly toolz
apt google_auth_httplib2 plotlywidget torch
apt_inst google_auth_oauthlib plotnine torchaudio
apt_pkg google_drive_downloader pluggy torchgen
aptsources googleapiclient pooch torchsummary
argparse googlesearch poplib torchtext
array graphviz portpicker torchvision
arviz greenlet posix tornado
ast gridfs posixpath tqdm
astor grp pprint trace
astropy grpc prefetch_generator traceback
astunparse gspread preshed tracemalloc
async_timeout gspread_dataframe prettytable traitlets
asynchat gym profile tree
asyncio gym_notices progressbar tty
asyncore gzip promise turtle
asynctest h5py prompt_toolkit tweepy
atari_py hashlib prophet typeguard
atexit heapdict pstats typer
atomicwrites heapq psutil types
attr hijri_converter psycopg2 typing
attrs hmac pty typing_extensions
audioop holidays ptyprocess tzlocal
audioread holoviews pvectorc unicodedata
autograd html pwd unification
autoreload html5lib py unittest
babel http py_compile uritemplate
backcall httpimport pyarrow urllib
base64 httplib2 pyasn1 urllib3
bdb httplib2shim pyasn1_modules uu
bin httpstan pyclbr uuid
binascii humanize pycocotools vega_datasets
binhex hyperopt pycparser venv
bisect idna pyct vis
bleach imageio pydantic warnings
blis imagesize pydata_google_auth wasabi
bokeh imaplib pydoc wave
boost imblearn pydoc_data wcwidth
branca imgaug pydot weakref
bs4 imghdr pydot_ng webargs
bson imp pydotplus webbrowser
builtins importlib pydrive webencodings
bz2 importlib_metadata pyemd werkzeug
cProfile importlib_resources pyexpat wheel
cachecontrol imutils pygments widgetsnbextension
cached_property inflect pygtkcompat wordcloud
cachetools inspect pylab wrapt
caffe2 intervaltree pylev wsgiref
calendar io pymc xarray
catalogue ipaddress pymeeus xarray_einstats
certifi ipykernel pymongo xdrlib
cffi ipykernel_launcher pymystem3 xgboost
cftime ipython_genutils pyparsing xkit
cgi ipywidgets pyrsistent xlrd
cgitb isympy pysndfile xlwt
chardet itertools pytest xml
charset_normalizer itsdangerous python_utils xmlrpc
chunk jax pytz xxlimited
clang jaxlib pyviz_comms xxsubtype
click jieba pywt yaml
client jinja2 pyximport yarl
clikit joblib qdldl yellowbrick
cloudpickle jpeg4py qudida zict
cmake json queue zipapp
cmath jsonschema quopri zipfile
cmd jupyter random zipimport
cmdstanpy jupyter_client re zipp
code jupyter_console readline zlib
codecs jupyter_core regex zmq
codeop jupyterlab_plotly reprlib
colab jupyterlab_widgets requests
Enter any module name to get more help. Or, type "modules spam" to search
for modules whose name or summary contain the string "spam".
- math
- keywords
- random
- datetime
14.0
['False', 'None', 'True', 'and', 'as', 'assert', 'async', 'await', 'break', 'class', 'continue', 'def', 'del', 'elif', 'else', 'except', 'finally', 'for', 'from', 'global', 'if', 'import', 'in', 'is', 'lambda', 'nonlocal', 'not', 'or', 'pass', 'raise', 'return', 'try', 'while', 'with', 'yield']
88
2022-11-08 15:50:21.228643
Please wait a moment while I gather a list of all available modules...
/usr/local/lib/python3.7/dist-packages/caffe2/proto/__init__.py:17: UserWarning: Caffe2 support is not enabled in this PyTorch build. Please enable Caffe2 by building PyTorch from source with `BUILD_CAFFE2=1` flag. /usr/local/lib/python3.7/dist-packages/caffe2/proto/__init__.py:17: UserWarning: Caffe2 support is not enabled in this PyTorch build. Please enable Caffe2 by building PyTorch from source with `BUILD_CAFFE2=1` flag. /usr/local/lib/python3.7/dist-packages/caffe2/python/__init__.py:9: UserWarning: Caffe2 support is not enabled in this PyTorch build. Please enable Caffe2 by building PyTorch from source with `BUILD_CAFFE2=1` flag.
Cython collections kaggle requests_oauthlib IPython colorcet kanren resampy OpenGL colorlover kapre resource PIL colorsys keras rlcompleter ScreenResolution community keras_preprocessing rmagic __future__ compileall keyword rpy2 _abc concurrent kiwisolver rsa _ast confection korean_lunar_calendar runpy _asyncio configparser langcodes samples _bisect cons lib2to3 sched _blake2 contextlib libfuturize scipy _bootlocale contextlib2 libpasteurize scs _bz2 contextvars librosa seaborn _cffi_backend convertdate lightgbm secrets _codecs copy linecache select _codecs_cn copyreg llvmlite selectors _codecs_hk crashtest lmdb send2trash _codecs_iso2022 crcmod locale setuptools _codecs_jp crypt locket setuptools_git _codecs_kr csimdjson logging shapely _codecs_tw csv lsb_release shelve _collections ctypes lunarcalendar shlex _collections_abc cufflinks lxml shutil _compat_pickle curses lzma signal _compression cv2 macpath simdjson _contextvars cvxopt mailbox site _crypt cvxpy mailcap sitecustomize _csv cycler markdown six _ctypes cymem markupsafe skimage _ctypes_test cython marshal sklearn _curses cythonmagic marshmallow sklearn_pandas _curses_panel daft math slugify _cvxcore dask matplotlib smart_open _datetime dataclasses matplotlib_venn smtpd _dbm datascience mimetypes smtplib _decimal datetime missingno sndhdr _distutils_hack dateutil mistune snowballstemmer _dlib_pybind11 dbm mizani socket _dummy_thread dbus mlxtend socketserver _ecos debugpy mmap socks _elementtree decimal modulefinder sockshandler _functools decorator more_itertools softwareproperties _hashlib defusedxml moviepy sortedcontainers _heapq descartes mpmath soundfile _imp difflib msgpack spacy _io dill multidict spacy_legacy _json dis multipledispatch spacy_loggers _locale distributed multiprocessing sphinx _lsprof distutils multitasking spwd _lzma dlib murmurhash sql _markupbase dns music21 sqlalchemy _md5 docs natsort sqlite3 _multibytecodec doctest nbconvert sqlparse _multiprocessing docutils nbformat sre_compile _opcode dopamine netCDF4 sre_constants _operator dot_parser netrc sre_parse _osx_support dummy_threading networkx srsly _pickle easydict nibabel ssl _plotly_future_ ecos nis stan _plotly_utils editdistance nisext stat _posixsubprocess ee nltk statistics _py_abc email nntplib statsmodels _pydecimal en_core_web_sm notebook storemagic _pyio encodings ntpath string _pyrsistent_version entrypoints nturl2path stringprep _pytest enum numba struct _queue ephem numbergen subprocess _random erfa numbers sunau _remote_module_non_scriptable errno numexpr symbol _rinterface_cffi_abi et_xmlfile numpy sympy _rinterface_cffi_api etils oauth2client sympyprinting _scs_direct etuples oauthlib symtable _scs_indirect fa2 ogr sys _sha1 fastai okgrade sysconfig _sha256 fastcore opcode syslog _sha3 fastdownload openpyxl tables _sha512 fastdtw operator tabnanny _signal fastjsonschema opt_einsum tabulate _sitebuiltins fastprogress optparse tarfile _socket fastrlock os tblib _soundfile faulthandler osgeo telnetlib _sqlite3 fcntl osqp tempfile _sre feather osqppurepy tenacity _ssl filecmp osr tensorboard _stat fileinput ossaudiodev tensorboard_data_server _string filelock packaging tensorboard_plugin_wit _strptime firebase_admin palettable tensorflow _struct fix_yahoo_finance pandas tensorflow_datasets _symtable flask pandas_datareader tensorflow_estimator _sysconfigdata_m_linux_x86_64-linux-gnu flatbuffers pandas_gbq tensorflow_gcs_config _sysconfigdata_m_x86_64-linux-gnu fnmatch pandas_profiling tensorflow_hub _testbuffer folium pandocfilters tensorflow_io_gcs_filesystem _testcapi formatter panel tensorflow_metadata _testimportmultiple fractions param tensorflow_probability _testmultiphase frozenlist parser termcolor _thread fsspec parso terminado _threading_local ftplib partd termios _tkinter functools past test _tracemalloc future pasta testpath _warnings gast pastel tests _weakref gc pathlib text_unidecode _weakrefset gdal pathy textblob _xxtestfuzz gdalconst patsy textwrap _yaml gdalnumeric pdb thinc abc gdown pep517 this absl genericpath pexpect threading aeppl gensim pickle threadpoolctl aesara geographiclib pickleshare tifffile aifc geopy pickletools time aiohttp getopt pip timeit aiosignal getpass pipes tkinter alabaster gettext piptools tlz albumentations gi pkg_resources token altair gin pkgutil tokenize antigravity glob platform toml apiclient glob2 plistlib tomli appdirs gnm plotly toolz apt google_auth_httplib2 plotlywidget torch apt_inst google_auth_oauthlib plotnine torchaudio apt_pkg google_drive_downloader pluggy torchgen aptsources googleapiclient pooch torchsummary argparse googlesearch poplib torchtext array graphviz portpicker torchvision arviz greenlet posix tornado ast gridfs posixpath tqdm astor grp pprint trace astropy grpc prefetch_generator traceback astunparse gspread preshed tracemalloc async_timeout gspread_dataframe prettytable traitlets asynchat gym profile tree asyncio gym_notices progressbar tty asyncore gzip promise turtle asynctest h5py prompt_toolkit tweepy atari_py hashlib prophet typeguard atexit heapdict pstats typer atomicwrites heapq psutil types attr hijri_converter psycopg2 typing attrs hmac pty typing_extensions audioop holidays ptyprocess tzlocal audioread holoviews pvectorc unicodedata autograd html pwd unification autoreload html5lib py unittest babel http py_compile uritemplate backcall httpimport pyarrow urllib base64 httplib2 pyasn1 urllib3 bdb httplib2shim pyasn1_modules uu bin httpstan pyclbr uuid binascii humanize pycocotools vega_datasets binhex hyperopt pycparser venv bisect idna pyct vis bleach imageio pydantic warnings blis imagesize pydata_google_auth wasabi bokeh imaplib pydoc wave boost imblearn pydoc_data wcwidth branca imgaug pydot weakref bs4 imghdr pydot_ng webargs bson imp pydotplus webbrowser builtins importlib pydrive webencodings bz2 importlib_metadata pyemd werkzeug cProfile importlib_resources pyexpat wheel cachecontrol imutils pygments widgetsnbextension cached_property inflect pygtkcompat wordcloud cachetools inspect pylab wrapt caffe2 intervaltree pylev wsgiref calendar io pymc xarray catalogue ipaddress pymeeus xarray_einstats certifi ipykernel pymongo xdrlib cffi ipykernel_launcher pymystem3 xgboost cftime ipython_genutils pyparsing xkit cgi ipywidgets pyrsistent xlrd cgitb isympy pysndfile xlwt chardet itertools pytest xml charset_normalizer itsdangerous python_utils xmlrpc chunk jax pytz xxlimited clang jaxlib pyviz_comms xxsubtype click jieba pywt yaml client jinja2 pyximport yarl clikit joblib qdldl yellowbrick cloudpickle jpeg4py qudida zict cmake json queue zipapp cmath jsonschema quopri zipfile cmd jupyter random zipimport cmdstanpy jupyter_client re zipp code jupyter_console readline zlib codecs jupyter_core regex zmq codeop jupyterlab_plotly reprlib colab jupyterlab_widgets requests Enter any module name to get more help. Or, type "modules spam" to search for modules whose name or summary contain the string "spam".
Loops in Python
- Need for loops
- While Loop
- For Loop
In [ ]:
# While loop example -> program to print the table
# Program -> Sum of all digits of a given number
# Program -> keep accepting numbers from users till he/she enters a 0 and then find the avg
In [ ]:
number = int(input('enter the number'))
i = 1
while i<11:
print(number,'*',i,'=',number * i)
i += 1
enter the number12
12 * 1 = 12
12 * 2 = 24
12 * 3 = 36
12 * 4 = 48
12 * 5 = 60
12 * 6 = 72
12 * 7 = 84
12 * 8 = 96
12 * 9 = 108
12 * 10 = 120
In [ ]:
# while loop with else
x = 1
while x < 3:
print(x)
x += 1
else:
print('limit crossed')
1
2
limit crossed
In [ ]:
# Guessing game
# generate a random integer between 1 and 100
import random
jackpot = random.randint(1,100)
guess = int(input('guess karo'))
counter = 1
while guess != jackpot:
if guess < jackpot:
print('galat!guess higher')
else:
print('galat!guess lower')
guess = int(input('guess karo'))
counter += 1
else:
print('correct guess')
print('attempts',counter)
guess karo7
galat!guess higher
guess karo50
galat!guess lower
guess karo30
galat!guess higher
guess karo40
galat!guess lower
guess karo35
galat!guess lower
guess karo32
galat!guess higher
guess karo33
correct guess
attempts 7
In [ ]:
# For loop demo
for i in {1,2,3,4,5}:
print(i)
1
2
3
4
5
In [ ]:
# For loop examples
- Need for loops
- While Loop
- For Loop
enter the number12 12 * 1 = 12 12 * 2 = 24 12 * 3 = 36 12 * 4 = 48 12 * 5 = 60 12 * 6 = 72 12 * 7 = 84 12 * 8 = 96 12 * 9 = 108 12 * 10 = 120
1 2 limit crossed
guess karo7 galat!guess higher guess karo50 galat!guess lower guess karo30 galat!guess higher guess karo40 galat!guess lower guess karo35 galat!guess lower guess karo32 galat!guess higher guess karo33 correct guess attempts 7
1 2 3 4 5
Program - The current population of a town is 10000. The population of the town is increasing at the rate of 10% per year. You have to write a program to find out the population at the end of each of the last 10 years.
In [ ]:
curr_pop = 10000
for i in range(10,0,-1):
print(i,curr_pop)
curr_pop = curr_pop - 0.1*curr_pop
10 10000
9 9000.0
8 8100.0
7 7290.0
6 6561.0
5 5904.9
4 5314.41
3 4782.969
2 4304.6721
1 3874.20489
10 10000 9 9000.0 8 8100.0 7 7290.0 6 6561.0 5 5904.9 4 5314.41 3 4782.969 2 4304.6721 1 3874.20489
Sequence sum
1/1! + 2/2! + 3/3! + ...
Session 1 task solution
1/1! + 2/2! + 3/3! + ...
Session 1 task solution
Task : Session 1
Solve these questions own your own and try to test yourself what you have learned in the session.
Happy Learning!
Solve these questions own your own and try to test yourself what you have learned in the session.
Happy Learning!
Q1 :- Print the given strings as per stated format.
Given strings:
"Data" "Science" "Mentorship" "Program"
"By" "CampusX"
Output:
Data-Science-Mentorship-Program-started-By-CampusX
Concept- [Seperator and End]
In [ ]:
# Write your code here
print('Data-Science-Mentronship-program-started-By-CampusX')
Data-Science-Mentronship-program-started-By-CampusX
Given strings:
"Data" "Science" "Mentorship" "Program"
"By" "CampusX"
Output:
Data-Science-Mentorship-Program-started-By-CampusX
Concept- [Seperator and End]
Data-Science-Mentronship-program-started-By-CampusX
Q2:- Write a program that will convert celsius value to fahrenheit.
In [ ]:
# Write your code here
cel=int(input('Enter the celcious value'))
fahrenheit = (1.8 * cel) + 32
print('the fahernahit value is',fahrenheit)
Enter the celcious value2
the fahernahit value is 35.6
Enter the celcious value2 the fahernahit value is 35.6
Q3:- Take 2 numbers as input from the user.Write a program to swap the numbers without using any special python syntax.
In [ ]:
# Write your code here
first_value=int(input('Enter the first number'))
second_value=int(input('Enter the second number'))
temp=first_value
first_value=second_value
second_value=temp
print(first_value,second_value)
Enter the first number3
Enter the second number2
2 3
Enter the first number3 Enter the second number2 2 3
Q4:- Write a program to find the euclidean distance between two coordinates.Take both the coordinates from the user as input.
In [ ]:
# Write your code here
Input : x1, y1 = (3, 4)
x2, y2 = (7, 7)
Output : 5
Input : x1, y1 = (3, 4)
x2, y2 = (4, 3)
Task Solution:----------------------------------
In [ ]:
In [ ]:
# Assignment 1 ka question 10
import math
h_t=float(input('Enter the Height ='))
w_t=float(input('Enter the width ='))
l_t=float(input('Enter the length ='))
h_g=float(input('Enter the height of the glass='))
r_g=float(input('Enter the radious of the glass ='))
vol_tank=h_t*w_t*l_t
vol_glass=3.14*r_g*r_g*h_g
print('Number of glasses=',math.floor(vol_tank/vol_glass))
Enter the Height =1234
Enter the width =234
Enter the length =123
Enter the height of the glass=12
Enter the radious of the glass =8
Number of glasses= 14728
In [ ]:
#Sum of square of N natural number
n=int(input('Enter the number'))
result= n*(n+1)*(2*n+1)/6 # formula or with loops
print('The sum of square of this natueal number',result)
Enter the number3
The sum of square of this natueal number 14.0
In [ ]:
#8 write the differance between terms and the sum of the values.
first_term=int(input('Enter the first term values ='))
second_term=int(input('Enter the second term values ='))
n=int(input('Enter the value of n ='))
d= second_term - first_term
an=first_term+(n-1)*d # where d is differance between two values
print('The sum of differance between two numbers=',an)
Enter the first term values =3
Enter the second term values =6
Enter the value of n =8
The sum of differance between two numbers 24
In [ ]:
# solve the sum of the fraction problem
n1=int(input('Enter the first numerator values'))
d1=int(input('Enter the first denominator values'))
n2=int(input('Enter the second numerator values'))
d2=int(input('Enter the second denominator values'))
fn=n1*d2+n2*d1
denominator=d1*d2
print('The fraction value is=',fn/denominator)
Enter the first numerator values2
Enter the first denominator values2
Enter the second numerator values3
Enter the second denominator values3
The fraction value is= 2.0
Task Solution:----------------------------------
Enter the Height =1234 Enter the width =234 Enter the length =123 Enter the height of the glass=12 Enter the radious of the glass =8 Number of glasses= 14728
Enter the number3 The sum of square of this natueal number 14.0
Enter the first term values =3 Enter the second term values =6 Enter the value of n =8 The sum of differance between two numbers 24
Enter the first numerator values2 Enter the first denominator values2 Enter the second numerator values3 Enter the second denominator values3 The fraction value is= 2.0
Print the given strings as per stated format.
In [ ]:
# In this progrma we manely want to seperate two line string.
print('Data', 'science', 'mentronship', 'program',sep ='-',end='-started-')
print('By', 'campusX',sep='-')
Data-science-mentronship-program-started-By-campusX
Data-science-mentronship-program-started-By-campusX
Print the value into celcious to faranhit.
In [ ]:
celcious=int(input('Enter the temperiture in celcious'))
faranhit= celcious *9/5+32 # c*(9/5)+32
print(faranhit)
Enter the temperiture in celcious4
39.2
Enter the temperiture in celcious4 39.2
Legs and chiken program
In [ ]:
#count the head od dog and chiken
x=int(input('Enter the number of head ofdog '))
dog=x*4
print('The number of leg of dog is=',dog)
y=int(input('Enter the number of head of cheken'))
chiken=y*2
print('The number of leg of chiken=',chiken )
Enter the number of head ofdog 5
the number of leg of dogis= 20
Enter the number of head of cheken50
the number of leg of chiken= 100
In [ ]:
num=int(input('Enter the number of leg of dog '))
if num%4==0:
print('This is dog')
elif (num%2)!=0:
print('this is not any one')
else:
print('This is a cheken')
Enter the number of leg of dog 6
This is a cheken
Enter the number of head ofdog 5 the number of leg of dogis= 20 Enter the number of head of cheken50 the number of leg of chiken= 100
Enter the number of leg of dog 6 This is a cheken
swapping program
In [1]:
#Swapping program without using extra variable
a=3
b=5
a=b
b=a
print(a)
5
In [ ]:
# First method which we swap twonumbers
a=3
b=5
a,b=b,a
print(a,b)
5 3
In [ ]:
# second method which we take one extra variable.
a=3
b=5
temp=a
a=b
b=temp
print(a)
print(b)
5
3
5
5 3
5 3
write a program for find the distance between two points.
In [ ]:
p_x1=int(input('Enter the first quardinate first point'))
q_y1=int(input('Enter the second quardinate first point'))
p_x2=int(input('Enter the first quardinate second point'))
q_y2=int(input('Enter the second quardinate second point'))
distance=((p_x2-p_x1**2) + (q_y2-q_y1)**2) **0.5
print(round,'The distance between two points is =',(distance,2))
Enter the first quardinate first point0
Enter the second quardinate first point0
Enter the first quardinate second point2
Enter the second quardinate second point2
<built-in function round> The distance between two points is = (2.449489742783178, 2)
Second day concepts in depth
In [ ]:
#Arithmatic operator
print(5+6)
print(5*6)
print(5/2)
print(5//2)#integer type division
print(5%2)
print(5**2)#yani five ki power two
11
30
2.5
2
1
25
Enter the first quardinate first point0 Enter the second quardinate first point0 Enter the first quardinate second point2 Enter the second quardinate second point2 <built-in function round> The distance between two points is = (2.449489742783178, 2)
Second day concepts in depth
In [ ]:
#Arithmatic operator
print(5+6)
print(5*6)
print(5/2)
print(5//2)#integer type division
print(5%2)
print(5**2)#yani five ki power two
11
30
2.5
2
1
25
relational operator
In [ ]:
#relational operator
print(2<5)
print(2>5)
print(2<=5)
print(5==6)
print(2>=5)
print(2==2)
True
False
True
False
False
True
In [ ]:
#relational operator
print(2<5)
print(2>5)
print(2<=5)
print(5==6)
print(2>=5)
print(2==2)
True
False
True
False
False
True
Logical operator
In [ ]:
#logical operator
print(2 and 0)
print(2 and 3)
print(5 or 10)
print(5 or 0)
print(0 or 5)
print(0 or 0 or 9)
print(2 and 6 and 5)
print(not 1 )
print(not 0)
0
3
5
5
5
9
5
False
True
In [ ]:
#logical operator
print(2 and 0)
print(2 and 3)
print(5 or 10)
print(5 or 0)
print(0 or 5)
print(0 or 0 or 9)
print(2 and 6 and 5)
print(not 1 )
print(not 0)
0
3
5
5
5
9
5
False
True
bitwise operator
In [ ]:
#bitwise operator
#bitwisewise and
print(2 & 3)
#bitwisewise or
print(2 | 3)
#bitwise xor
print(2 ^ 3)# xor me same me zero aur diffent me 1
print(2 ^ 2)
#bitwise xnor
print(~3)
#bitwise left shift operator
print(2 >> 4)
print(4 >> 2)
#bitwise right shift operator
print(2 << 4)
print(4 << 3 )
#Assignment operator
a=2
# a=a+2
a+=2
print(a)
#second
a=2
#that means a=a%2
a%=2
print(a)# eska matlab a ka 2 ke sath modulas ho rha hai aur a me hi store ho ja rha hai.
#membership
#in/not in
print('d' in 'delhi')#delhi me d hai ya nhi
print('d' not in 'delhi')
print(1 in [1,2,3,4,5,6,7])
print('D' in 'delhi')
#program
number=int(input("enter the 3 digit number= "))
#345%10 krne pr 5melega
a=number%10
number=number//10 #yaha 45 ka integer division krne pr 5 melega
#34%10 krne pr 4 melega
b=number%10
number=number//10# yaha 4 ka integer division krne pr 4 mel rha hai
#3%10 krne pr 3 melega
c=number%10
print(a+b+c)
#program for enter 6 digit number and add its bit
number=int(input('Enter six digit number = '))
a=number%10
number=number//10
b==number%10
number=number//10
c=number%10
number=number//10
d=number%10
number=number//10
e=number%10
number=number//10
f=number%10
print(a+b+c+d+e+f)
2
3
1
0
-4
0
1
32
32
4
0
True
False
True
False
enter the 3 digit number= 123
6
Enter six digit number = 987654
36
In [ ]:
#bitwise operator
#bitwisewise and
print(2 & 3)
#bitwisewise or
print(2 | 3)
#bitwise xor
print(2 ^ 3)# xor me same me zero aur diffent me 1
print(2 ^ 2)
#bitwise xnor
print(~3)
#bitwise left shift operator
print(2 >> 4)
print(4 >> 2)
#bitwise right shift operator
print(2 << 4)
print(4 << 3 )
#Assignment operator
a=2
# a=a+2
a+=2
print(a)
#second
a=2
#that means a=a%2
a%=2
print(a)# eska matlab a ka 2 ke sath modulas ho rha hai aur a me hi store ho ja rha hai.
#membership
#in/not in
print('d' in 'delhi')#delhi me d hai ya nhi
print('d' not in 'delhi')
print(1 in [1,2,3,4,5,6,7])
print('D' in 'delhi')
#program
number=int(input("enter the 3 digit number= "))
#345%10 krne pr 5melega
a=number%10
number=number//10 #yaha 45 ka integer division krne pr 5 melega
#34%10 krne pr 4 melega
b=number%10
number=number//10# yaha 4 ka integer division krne pr 4 mel rha hai
#3%10 krne pr 3 melega
c=number%10
print(a+b+c)
#program for enter 6 digit number and add its bit
number=int(input('Enter six digit number = '))
a=number%10
number=number//10
b==number%10
number=number//10
c=number%10
number=number//10
d=number%10
number=number//10
e=number%10
number=number//10
f=number%10
print(a+b+c+d+e+f)
2
3
1
0
-4
0
1
32
32
4
0
True
False
True
False
enter the 3 digit number= 123
6
Enter six digit number = 987654
36
if else1
In [ ]:
#write the login second program
email=input('Enter the email')
password=input('Enter the password')
if email =='rsinghlax@gmail.com' and password =='9696':
print('welcome for joining')
elif email =='rsinghlax@gmail.com' and password !='9696' :
print('Incorrect password')
password=input('Enter the password again')
if password == '1234':
print('welcome,finally')
else:
print('Beta tumse nhi ho payega')
else:
print("Your email or password is incorrect")
Enter the emailrsinghlax@gmail.com
Enter the password1234
Incorrect password
Enter the password again1234
welcome,finally
In [ ]:
#max of three number
a=int(input('Enter the first number'))
b=int(input('Enter the second number'))
c=int(input('Enter the third number'))
if a>b and a>c:
print('first value is correct')
elif b>a and b>c:
print('the second value is correct')
else:
print('third value is correct')
Enter the first number9
Enter the second number8
Enter the third number4
first value is correct
In [ ]:Enter the first number2
Enter the second number3
Enter the third number4
first value is correct
In [ ]:
#menu driven calculator program
f_num=int(input('enter the 1st number'))
s_num=int(input('enter the 1st number'))
#th_num=int(input('enter the 1st number'))
op=input('Enter the operation')
if op == '+' :
print('The right answer is=',f_num + s_num)
elif op == '-':
print('The right answer is=',f_num - s_num)
elif op == '*':
print('The right answer is=',f_num * s_num)
else:
print('The right answer is=',f_num / s_num)
enter the 1st number32
enter the 1st number12
Enter the operation/
The right answer is= 2.6666666666666665
In [ ]:
#write the login second program
email=input('Enter the email')
password=input('Enter the password')
if email =='rsinghlax@gmail.com' and password =='9696':
print('welcome for joining')
elif email =='rsinghlax@gmail.com' and password !='9696' :
print('Incorrect password')
password=input('Enter the password again')
if password == '1234':
print('welcome,finally')
else:
print('Beta tumse nhi ho payega')
else:
print("Your email or password is incorrect")
Enter the emailrsinghlax@gmail.com
Enter the password1234
Incorrect password
Enter the password again1234
welcome,finally
In [ ]:
#max of three number
a=int(input('Enter the first number'))
b=int(input('Enter the second number'))
c=int(input('Enter the third number'))
if a>b and a>c:
print('first value is correct')
elif b>a and b>c:
print('the second value is correct')
else:
print('third value is correct')
Enter the first number9
Enter the second number8
Enter the third number4
first value is correct
In [ ]:Enter the first number2
Enter the second number3
Enter the third number4
first value is correct
In [ ]:
#menu driven calculator program
f_num=int(input('enter the 1st number'))
s_num=int(input('enter the 1st number'))
#th_num=int(input('enter the 1st number'))
op=input('Enter the operation')
if op == '+' :
print('The right answer is=',f_num + s_num)
elif op == '-':
print('The right answer is=',f_num - s_num)
elif op == '*':
print('The right answer is=',f_num * s_num)
else:
print('The right answer is=',f_num / s_num)
enter the 1st number32
enter the 1st number12
Enter the operation/
The right answer is= 2.6666666666666665
Atm software program
In [ ]:
email=input('Enter the email')
password=input('Enter the password')
if email =='rsinghlax@gmail.com' and password =='9696':
print('welcome for joining')
else:
print("Your email or password is incorrect")
Enter the emailrsinghlax@gmail.com
Enter the password9696
welcome for joining
In [ ]:
#menu based atm program
# multiple line string ko triple coat me likha jata hai
menu=input("""
Hi! how can i help you
1. Enter 1 for pin change
2. Enter 2 for baleance cheak
3. Enter 3 for withdrawl
4. Enter 4 for Exit
""")
if menu == '1':
print('change your pin')
elif menu == '2':
print('baleance cheak')
elif menu == '3':
print('For withdrawl')
else:
print('Exit')
Hi! how can i help you
1. Enter 1 for pin change
2. Enter 2 for baleance cheak
3. Enter 3 for withdrawl
4. Enter 4 for Exit
3
For withdrawl
In [ ]:
email=input('Enter the email')
password=input('Enter the password')
if email =='rsinghlax@gmail.com' and password =='9696':
print('welcome for joining')
else:
print("Your email or password is incorrect")
Enter the emailrsinghlax@gmail.com
Enter the password9696
welcome for joining
In [ ]:
#menu based atm program
# multiple line string ko triple coat me likha jata hai
menu=input("""
Hi! how can i help you
1. Enter 1 for pin change
2. Enter 2 for baleance cheak
3. Enter 3 for withdrawl
4. Enter 4 for Exit
""")
if menu == '1':
print('change your pin')
elif menu == '2':
print('baleance cheak')
elif menu == '3':
print('For withdrawl')
else:
print('Exit')
Hi! how can i help you
1. Enter 1 for pin change
2. Enter 2 for baleance cheak
3. Enter 3 for withdrawl
4. Enter 4 for Exit
3
For withdrawl
modules
In [ ]:
#modules me kesi ke likhe gye code ko use krte hai
#esme bhout se funcrion use hote hai math,keyword,date time, random
#These are already written format
# esme hum modules ko import krte hai
In [ ]:
#math module
import math
x=math.factorial(4)
print('The factorial of 4 is=',x)
x=math.sqrt(196) #yadi chea to bina kesi aur variable me store kre bhi kiya ja skta hai.
print('The sqrt of 196 is =',x)
The factorial of 4 is= 24
The sqrt of 196 is = 14.0
In [ ]:
In [ ]:
#keyword
import keyword
keyword.kwlist
Out[ ]:['False',
'None',
'True',
'and',
'as',
'assert',
'async',
'await',
'break',
'class',
'continue',
'def',
'del',
'elif',
'else',
'except',
'finally',
'for',
'from',
'global',
'if',
'import',
'in',
'is',
'lambda',
'nonlocal',
'not',
'or',
'pass',
'raise',
'return',
'try',
'while',
'with',
'yield']
In [ ]:
#Es method se bhi likha ja skta hai.
import keyword
key_word_ki_list=keyword.kwlist
print(key_word_ki_list)
['False', 'None', 'True', 'and', 'as', 'assert', 'async', 'await', 'break', 'class', 'continue', 'def', 'del', 'elif', 'else', 'except', 'finally', 'for', 'from', 'global', 'if', 'import', 'in', 'is', 'lambda', 'nonlocal', 'not', 'or', 'pass', 'raise', 'return', 'try', 'while', 'with', 'yield']
In [ ]:
# random module
import random
x=random.randint(5,100)#5 se 100 ke beech koi bhi random value dene ka kaam krta hai.
print('The random value bitween 5 to 100 many more or single =',x)
The random value bitween 5 to 100 many more or single = 81
In [ ]:
#Date and time module
import datetime
print(datetime.datetime.now())
print(help('modules'))
Please wait a moment while I gather a list of all available modules...
/usr/local/lib/python3.10/dist-packages/IPython/kernel/__init__.py:12: ShimWarning: The `IPython.kernel` package has been deprecated since IPython 4.0.You should import from ipykernel or jupyter_client instead.
warn("The `IPython.kernel` package has been deprecated since IPython 4.0."
/usr/local/lib/python3.10/dist-packages/altair/vega/v5/__init__.py:18: AltairDeprecationWarning: The module altair.vega.v5 is deprecated and will be removed in Altair 5.
warnings.warn(
/usr/local/lib/python3.10/dist-packages/altair/vegalite/v3/__init__.py:29: AltairDeprecationWarning: The module altair.vegalite.v3 is deprecated and will be removed in Altair 5. Use `import altair as alt` instead of `import altair.vegalite.v3 as alt`.
warnings.warn(
/usr/local/lib/python3.10/dist-packages/jupyter_client/ssh/tunnel.py:57: DeprecationWarning:
zmq.utils.strtypes is deprecated in pyzmq 23.
Downloading https://dlib.net/files/shape_predictor_68_face_landmarks.dat.bz2 to /root/mlxtend_data/shape_predictor_68_face_landmarks.dat.bz2
/usr/local/lib/python3.10/dist-packages/moviepy/video/fx/painting.py:7: DeprecationWarning:
Please use `sobel` from the `scipy.ndimage` namespace, the `scipy.ndimage.filters` namespace is deprecated.
/usr/lib/python3.10/pkgutil.py:92: UserWarning:
The DICOM readers are highly experimental, unstable, and only work for Siemens time-series at the moment
Please use with caution. We would be grateful for your help in improving them
/usr/local/lib/python3.10/dist-packages/nltk/twitter/__init__.py:20: UserWarning:
The twython library has not been installed. Some functionality from the twitter package will not be available.
/usr/local/lib/python3.10/dist-packages/notebook/utils.py:280: DeprecationWarning:
distutils Version classes are deprecated. Use packaging.version instead.
/usr/local/lib/python3.10/dist-packages/notebook/utils.py:280: DeprecationWarning:
distutils Version classes are deprecated. Use packaging.version instead.
/usr/local/lib/python3.10/dist-packages/matplotlib_inline/config.py:68: DeprecationWarning:
InlineBackend._figure_format_changed is deprecated in traitlets 4.1: use @observe and @unobserve instead.
/usr/lib/python3.10/pkgutil.py:92: NumbaPendingDeprecationWarning:
The 'pycc' module is pending deprecation. Replacement technology is being developed.
Pending Deprecation in Numba 0.57.0. For more information please see: https://numba.readthedocs.io/en/stable/reference/deprecation.html#deprecation-of-the-numba-pycc-module
/usr/lib/python3.10/pkgutil.py:92: UserWarning:
The numpy.array_api submodule is still experimental. See NEP 47.
/usr/lib/python3.10/pkgutil.py:92: DeprecationWarning:
`numpy.distutils` is deprecated since NumPy 1.23.0, as a result
of the deprecation of `distutils` itself. It will be removed for
Python >= 3.12. For older Python versions it will remain present.
It is recommended to use `setuptools < 60.0` for those Python versions.
For more details, see:
https://numpy.org/devdocs/reference/distutils_status_migration.html
/usr/local/lib/python3.10/dist-packages/pandas/core/indexes/multi.py:643: DeprecationWarning:
`cumproduct` is deprecated as of NumPy 1.25.0, and will be removed in NumPy 2.0. Please use `cumprod` instead.
/usr/local/lib/python3.10/dist-packages/pandas/core/reshape/util.py:60: DeprecationWarning:
`product` is deprecated as of NumPy 1.25.0, and will be removed in NumPy 2.0. Please use `prod` instead.
/usr/local/lib/python3.10/dist-packages/pandas/core/reshape/util.py:60: DeprecationWarning:
`product` is deprecated as of NumPy 1.25.0, and will be removed in NumPy 2.0. Please use `prod` instead.
/usr/local/lib/python3.10/dist-packages/pandas/core/indexes/multi.py:643: DeprecationWarning:
`cumproduct` is deprecated as of NumPy 1.25.0, and will be removed in NumPy 2.0. Please use `cumprod` instead.
/usr/local/lib/python3.10/dist-packages/pandas/core/reshape/util.py:60: DeprecationWarning:
`product` is deprecated as of NumPy 1.25.0, and will be removed in NumPy 2.0. Please use `prod` instead.
/usr/local/lib/python3.10/dist-packages/pandas/core/reshape/util.py:60: DeprecationWarning:
`product` is deprecated as of NumPy 1.25.0, and will be removed in NumPy 2.0. Please use `prod` instead.
/usr/local/lib/python3.10/dist-packages/pandas/core/reshape/util.py:60: DeprecationWarning:
`product` is deprecated as of NumPy 1.25.0, and will be removed in NumPy 2.0. Please use `prod` instead.
/usr/local/lib/python3.10/dist-packages/pandas_datareader/compat/__init__.py:11: DeprecationWarning:
distutils Version classes are deprecated. Use packaging.version instead.
/usr/local/lib/python3.10/dist-packages/pandas_datareader/compat/__init__.py:13: DeprecationWarning:
distutils Version classes are deprecated. Use packaging.version instead.
/usr/local/lib/python3.10/dist-packages/pandas_datareader/compat/__init__.py:14: DeprecationWarning:
distutils Version classes are deprecated. Use packaging.version instead.
/usr/local/lib/python3.10/dist-packages/pandas_datareader/compat/__init__.py:15: DeprecationWarning:
distutils Version classes are deprecated. Use packaging.version instead.
/usr/local/lib/python3.10/dist-packages/pip/_vendor/pkg_resources/__init__.py:121: DeprecationWarning:
pkg_resources is deprecated as an API
/usr/local/lib/python3.10/dist-packages/pip/_vendor/pkg_resources/__init__.py:2870: DeprecationWarning:
Deprecated call to `pkg_resources.declare_namespace('google')`.
Implementing implicit namespace packages (as specified in PEP 420) is preferred to `pkg_resources.declare_namespace`. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
/usr/local/lib/python3.10/dist-packages/pip/_vendor/pkg_resources/__init__.py:2870: DeprecationWarning:
Deprecated call to `pkg_resources.declare_namespace('google')`.
Implementing implicit namespace packages (as specified in PEP 420) is preferred to `pkg_resources.declare_namespace`. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
/usr/local/lib/python3.10/dist-packages/pip/_vendor/pkg_resources/__init__.py:2870: DeprecationWarning:
Deprecated call to `pkg_resources.declare_namespace('google.cloud')`.
Implementing implicit namespace packages (as specified in PEP 420) is preferred to `pkg_resources.declare_namespace`. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
/usr/local/lib/python3.10/dist-packages/pip/_vendor/pkg_resources/__init__.py:2349: DeprecationWarning:
Deprecated call to `pkg_resources.declare_namespace('google')`.
Implementing implicit namespace packages (as specified in PEP 420) is preferred to `pkg_resources.declare_namespace`. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
/usr/local/lib/python3.10/dist-packages/pip/_vendor/pkg_resources/__init__.py:2870: DeprecationWarning:
Deprecated call to `pkg_resources.declare_namespace('google')`.
Implementing implicit namespace packages (as specified in PEP 420) is preferred to `pkg_resources.declare_namespace`. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
/usr/local/lib/python3.10/dist-packages/pip/_vendor/pkg_resources/__init__.py:2870: DeprecationWarning:
Deprecated call to `pkg_resources.declare_namespace('google.cloud')`.
Implementing implicit namespace packages (as specified in PEP 420) is preferred to `pkg_resources.declare_namespace`. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
/usr/local/lib/python3.10/dist-packages/pip/_vendor/pkg_resources/__init__.py:2870: DeprecationWarning:
Deprecated call to `pkg_resources.declare_namespace('google')`.
Implementing implicit namespace packages (as specified in PEP 420) is preferred to `pkg_resources.declare_namespace`. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
/usr/local/lib/python3.10/dist-packages/pip/_vendor/pkg_resources/__init__.py:2870: DeprecationWarning:
Deprecated call to `pkg_resources.declare_namespace('google.cloud')`.
Implementing implicit namespace packages (as specified in PEP 420) is preferred to `pkg_resources.declare_namespace`. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
/usr/local/lib/python3.10/dist-packages/pip/_vendor/pkg_resources/__init__.py:2870: DeprecationWarning:
Deprecated call to `pkg_resources.declare_namespace('google')`.
Implementing implicit namespace packages (as specified in PEP 420) is preferred to `pkg_resources.declare_namespace`. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
/usr/local/lib/python3.10/dist-packages/pip/_vendor/pkg_resources/__init__.py:2870: DeprecationWarning:
Deprecated call to `pkg_resources.declare_namespace('google.cloud')`.
Implementing implicit namespace packages (as specified in PEP 420) is preferred to `pkg_resources.declare_namespace`. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
/usr/local/lib/python3.10/dist-packages/pip/_vendor/pkg_resources/__init__.py:2870: DeprecationWarning:
Deprecated call to `pkg_resources.declare_namespace('google')`.
Implementing implicit namespace packages (as specified in PEP 420) is preferred to `pkg_resources.declare_namespace`. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
/usr/local/lib/python3.10/dist-packages/pip/_vendor/pkg_resources/__init__.py:2870: DeprecationWarning:
Deprecated call to `pkg_resources.declare_namespace('google.cloud')`.
Implementing implicit namespace packages (as specified in PEP 420) is preferred to `pkg_resources.declare_namespace`. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
/usr/local/lib/python3.10/dist-packages/pip/_vendor/pkg_resources/__init__.py:2870: DeprecationWarning:
Deprecated call to `pkg_resources.declare_namespace('google')`.
Implementing implicit namespace packages (as specified in PEP 420) is preferred to `pkg_resources.declare_namespace`. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
/usr/local/lib/python3.10/dist-packages/pip/_vendor/pkg_resources/__init__.py:2870: DeprecationWarning:
Deprecated call to `pkg_resources.declare_namespace('google.cloud')`.
Implementing implicit namespace packages (as specified in PEP 420) is preferred to `pkg_resources.declare_namespace`. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
/usr/local/lib/python3.10/dist-packages/pip/_vendor/pkg_resources/__init__.py:2870: DeprecationWarning:
Deprecated call to `pkg_resources.declare_namespace('google')`.
Implementing implicit namespace packages (as specified in PEP 420) is preferred to `pkg_resources.declare_namespace`. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
/usr/local/lib/python3.10/dist-packages/pip/_vendor/pkg_resources/__init__.py:2870: DeprecationWarning:
Deprecated call to `pkg_resources.declare_namespace('google.cloud')`.
Implementing implicit namespace packages (as specified in PEP 420) is preferred to `pkg_resources.declare_namespace`. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
/usr/local/lib/python3.10/dist-packages/pip/_vendor/pkg_resources/__init__.py:2870: DeprecationWarning:
Deprecated call to `pkg_resources.declare_namespace('google')`.
Implementing implicit namespace packages (as specified in PEP 420) is preferred to `pkg_resources.declare_namespace`. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
/usr/local/lib/python3.10/dist-packages/pip/_vendor/pkg_resources/__init__.py:2870: DeprecationWarning:
Deprecated call to `pkg_resources.declare_namespace('google.cloud')`.
Implementing implicit namespace packages (as specified in PEP 420) is preferred to `pkg_resources.declare_namespace`. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
/usr/local/lib/python3.10/dist-packages/pip/_vendor/pkg_resources/__init__.py:2870: DeprecationWarning:
Deprecated call to `pkg_resources.declare_namespace('google')`.
Implementing implicit namespace packages (as specified in PEP 420) is preferred to `pkg_resources.declare_namespace`. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
/usr/local/lib/python3.10/dist-packages/pip/_vendor/pkg_resources/__init__.py:2870: DeprecationWarning:
Deprecated call to `pkg_resources.declare_namespace('google.cloud')`.
Implementing implicit namespace packages (as specified in PEP 420) is preferred to `pkg_resources.declare_namespace`. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
/usr/local/lib/python3.10/dist-packages/pip/_vendor/pkg_resources/__init__.py:2870: DeprecationWarning:
Deprecated call to `pkg_resources.declare_namespace('google')`.
Implementing implicit namespace packages (as specified in PEP 420) is preferred to `pkg_resources.declare_namespace`. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
/usr/local/lib/python3.10/dist-packages/pip/_vendor/pkg_resources/__init__.py:2870: DeprecationWarning:
Deprecated call to `pkg_resources.declare_namespace('google')`.
Implementing implicit namespace packages (as specified in PEP 420) is preferred to `pkg_resources.declare_namespace`. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
/usr/local/lib/python3.10/dist-packages/pip/_vendor/pkg_resources/__init__.py:2870: DeprecationWarning:
Deprecated call to `pkg_resources.declare_namespace('mpl_toolkits')`.
Implementing implicit namespace packages (as specified in PEP 420) is preferred to `pkg_resources.declare_namespace`. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
/usr/local/lib/python3.10/dist-packages/pip/_vendor/pkg_resources/__init__.py:2870: DeprecationWarning:
Deprecated call to `pkg_resources.declare_namespace('google')`.
Implementing implicit namespace packages (as specified in PEP 420) is preferred to `pkg_resources.declare_namespace`. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
/usr/local/lib/python3.10/dist-packages/pip/_vendor/pkg_resources/__init__.py:2870: DeprecationWarning:
Deprecated call to `pkg_resources.declare_namespace('sphinxcontrib')`.
Implementing implicit namespace packages (as specified in PEP 420) is preferred to `pkg_resources.declare_namespace`. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
Python version: 3.10.12 (main, Nov 20 2023, 15:14:05) [GCC 11.4.0]
GEOS version: 3.11.3-CAPI-1.17.3
Numpy version: 1.25.2
/usr/lib/python3.10/pkgutil.py:92: UserWarning: viewer requires Qt
/usr/local/lib/python3.10/dist-packages/tensorboard/_vendor/html5lib/filters/sanitizer.py:29: DeprecationWarning: html5lib's sanitizer is deprecated; see https://github.com/html5lib/html5lib-python/issues/443 and please let us know if Bleach is unsuitable for your needs
/usr/local/lib/python3.10/dist-packages/tensorflow_probability/python/__init__.py:49: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives
/usr/local/lib/python3.10/dist-packages/torch/distributed/_shard/checkpoint/__init__.py:8: DeprecationWarning: torch.distributed._shard.checkpoint will be deprecated, use torch.distributed.checkpoint instead
/usr/local/lib/python3.10/dist-packages/torch/distributed/_sharded_tensor/__init__.py:8: DeprecationWarning: torch.distributed._sharded_tensor will be deprecated, use torch.distributed._shard.sharded_tensor instead
/usr/local/lib/python3.10/dist-packages/torch/distributed/_sharding_spec/__init__.py:8: DeprecationWarning: torch.distributed._sharding_spec will be deprecated, use torch.distributed._shard.sharding_spec instead
No CUDA runtime is found, using CUDA_HOME='/usr/local/cuda'
---------------------------------------------------------------------------
Skipped Traceback (most recent call last)
in <cell line: 4>()
2 import datetime
3 datetime.datetime.now()
----> 4 help('modules')
/usr/lib/python3.10/_sitebuiltins.py in __call__(self, *args, **kwds)
101 def __call__(self, *args, **kwds):
102 import pydoc
--> 103 return pydoc.help(*args, **kwds)
/usr/lib/python3.10/pydoc.py in __call__(self, request)
2011 def __call__(self, request=_GoInteractive):
2012 if request is not self._GoInteractive:
-> 2013 self.help(request)
2014 else:
2015 self.intro()
/usr/lib/python3.10/pydoc.py in help(self, request)
2058 elif request == 'symbols': self.listsymbols()
2059 elif request == 'topics': self.listtopics()
-> 2060 elif request == 'modules': self.listmodules()
2061 elif request[:8] == 'modules ':
2062 self.listmodules(request.split()[1])
/usr/lib/python3.10/pydoc.py in listmodules(self, key)
2210 def onerror(modname):
2211 callback(None, modname, None)
-> 2212 ModuleScanner().run(callback, onerror=onerror)
2213 self.list(modules.keys())
2214 self.output.write('''
/usr/lib/python3.10/pydoc.py in run(self, callback, key, completer, onerror)
2239 callback(None, modname, desc)
2240
-> 2241 for importer, modname, ispkg in pkgutil.walk_packages(onerror=onerror):
2242 if self.quit:
2243 break
/usr/lib/python3.10/pkgutil.py in walk_packages(path, prefix, onerror)
105 path = [p for p in path if not seen(p)]
106
--> 107 yield from walk_packages(path, info.name+'.', onerror)
108
109
/usr/lib/python3.10/pkgutil.py in walk_packages(path, prefix, onerror)
90 if info.ispkg:
91 try:
---> 92 __import__(info.name)
93 except ImportError:
94 if onerror is not None:
/usr/local/lib/python3.10/dist-packages/xgboost/testing/__init__.py in <module>
45 )
46
---> 47 hypothesis = pytest.importorskip("hypothesis")
48
49 # pylint:disable=wrong-import-position,wrong-import-order
/usr/local/lib/python3.10/dist-packages/_pytest/outcomes.py in importorskip(modname, minversion, reason)
294 if reason is None:
295 reason = f"could not import {modname!r}: {exc}"
--> 296 raise Skipped(reason, allow_module_level=True) from None
297 mod = sys.modules[modname]
298 if minversion is None:
Skipped: could not import 'hypothesis': No module named 'hypothesis'
In [ ]:
#modules me kesi ke likhe gye code ko use krte hai
#esme bhout se funcrion use hote hai math,keyword,date time, random
#These are already written format
# esme hum modules ko import krte hai
In [ ]:
#math module
import math
x=math.factorial(4)
print('The factorial of 4 is=',x)
x=math.sqrt(196) #yadi chea to bina kesi aur variable me store kre bhi kiya ja skta hai.
print('The sqrt of 196 is =',x)
The factorial of 4 is= 24
The sqrt of 196 is = 14.0
In [ ]:
In [ ]:
#keyword
import keyword
keyword.kwlist
Out[ ]:['False',
'None',
'True',
'and',
'as',
'assert',
'async',
'await',
'break',
'class',
'continue',
'def',
'del',
'elif',
'else',
'except',
'finally',
'for',
'from',
'global',
'if',
'import',
'in',
'is',
'lambda',
'nonlocal',
'not',
'or',
'pass',
'raise',
'return',
'try',
'while',
'with',
'yield']
In [ ]:
#Es method se bhi likha ja skta hai.
import keyword
key_word_ki_list=keyword.kwlist
print(key_word_ki_list)
['False', 'None', 'True', 'and', 'as', 'assert', 'async', 'await', 'break', 'class', 'continue', 'def', 'del', 'elif', 'else', 'except', 'finally', 'for', 'from', 'global', 'if', 'import', 'in', 'is', 'lambda', 'nonlocal', 'not', 'or', 'pass', 'raise', 'return', 'try', 'while', 'with', 'yield']
In [ ]:
# random module
import random
x=random.randint(5,100)#5 se 100 ke beech koi bhi random value dene ka kaam krta hai.
print('The random value bitween 5 to 100 many more or single =',x)
The random value bitween 5 to 100 many more or single = 81
In [ ]:
#Date and time module
import datetime
print(datetime.datetime.now())
print(help('modules'))
Please wait a moment while I gather a list of all available modules...
/usr/local/lib/python3.10/dist-packages/IPython/kernel/__init__.py:12: ShimWarning: The `IPython.kernel` package has been deprecated since IPython 4.0.You should import from ipykernel or jupyter_client instead.
warn("The `IPython.kernel` package has been deprecated since IPython 4.0."
/usr/local/lib/python3.10/dist-packages/altair/vega/v5/__init__.py:18: AltairDeprecationWarning: The module altair.vega.v5 is deprecated and will be removed in Altair 5.
warnings.warn(
/usr/local/lib/python3.10/dist-packages/altair/vegalite/v3/__init__.py:29: AltairDeprecationWarning: The module altair.vegalite.v3 is deprecated and will be removed in Altair 5. Use `import altair as alt` instead of `import altair.vegalite.v3 as alt`.
warnings.warn(
/usr/local/lib/python3.10/dist-packages/jupyter_client/ssh/tunnel.py:57: DeprecationWarning:
zmq.utils.strtypes is deprecated in pyzmq 23.
Downloading https://dlib.net/files/shape_predictor_68_face_landmarks.dat.bz2 to /root/mlxtend_data/shape_predictor_68_face_landmarks.dat.bz2
/usr/local/lib/python3.10/dist-packages/moviepy/video/fx/painting.py:7: DeprecationWarning:
Please use `sobel` from the `scipy.ndimage` namespace, the `scipy.ndimage.filters` namespace is deprecated.
/usr/lib/python3.10/pkgutil.py:92: UserWarning:
The DICOM readers are highly experimental, unstable, and only work for Siemens time-series at the moment
Please use with caution. We would be grateful for your help in improving them
/usr/local/lib/python3.10/dist-packages/nltk/twitter/__init__.py:20: UserWarning:
The twython library has not been installed. Some functionality from the twitter package will not be available.
/usr/local/lib/python3.10/dist-packages/notebook/utils.py:280: DeprecationWarning:
distutils Version classes are deprecated. Use packaging.version instead.
/usr/local/lib/python3.10/dist-packages/notebook/utils.py:280: DeprecationWarning:
distutils Version classes are deprecated. Use packaging.version instead.
/usr/local/lib/python3.10/dist-packages/matplotlib_inline/config.py:68: DeprecationWarning:
InlineBackend._figure_format_changed is deprecated in traitlets 4.1: use @observe and @unobserve instead.
/usr/lib/python3.10/pkgutil.py:92: NumbaPendingDeprecationWarning:
The 'pycc' module is pending deprecation. Replacement technology is being developed.
Pending Deprecation in Numba 0.57.0. For more information please see: https://numba.readthedocs.io/en/stable/reference/deprecation.html#deprecation-of-the-numba-pycc-module
/usr/lib/python3.10/pkgutil.py:92: UserWarning:
The numpy.array_api submodule is still experimental. See NEP 47.
/usr/lib/python3.10/pkgutil.py:92: DeprecationWarning:
`numpy.distutils` is deprecated since NumPy 1.23.0, as a result
of the deprecation of `distutils` itself. It will be removed for
Python >= 3.12. For older Python versions it will remain present.
It is recommended to use `setuptools < 60.0` for those Python versions.
For more details, see:
https://numpy.org/devdocs/reference/distutils_status_migration.html
/usr/local/lib/python3.10/dist-packages/pandas/core/indexes/multi.py:643: DeprecationWarning:
`cumproduct` is deprecated as of NumPy 1.25.0, and will be removed in NumPy 2.0. Please use `cumprod` instead.
/usr/local/lib/python3.10/dist-packages/pandas/core/reshape/util.py:60: DeprecationWarning:
`product` is deprecated as of NumPy 1.25.0, and will be removed in NumPy 2.0. Please use `prod` instead.
/usr/local/lib/python3.10/dist-packages/pandas/core/reshape/util.py:60: DeprecationWarning:
`product` is deprecated as of NumPy 1.25.0, and will be removed in NumPy 2.0. Please use `prod` instead.
/usr/local/lib/python3.10/dist-packages/pandas/core/indexes/multi.py:643: DeprecationWarning:
`cumproduct` is deprecated as of NumPy 1.25.0, and will be removed in NumPy 2.0. Please use `cumprod` instead.
/usr/local/lib/python3.10/dist-packages/pandas/core/reshape/util.py:60: DeprecationWarning:
`product` is deprecated as of NumPy 1.25.0, and will be removed in NumPy 2.0. Please use `prod` instead.
/usr/local/lib/python3.10/dist-packages/pandas/core/reshape/util.py:60: DeprecationWarning:
`product` is deprecated as of NumPy 1.25.0, and will be removed in NumPy 2.0. Please use `prod` instead.
/usr/local/lib/python3.10/dist-packages/pandas/core/reshape/util.py:60: DeprecationWarning:
`product` is deprecated as of NumPy 1.25.0, and will be removed in NumPy 2.0. Please use `prod` instead.
/usr/local/lib/python3.10/dist-packages/pandas_datareader/compat/__init__.py:11: DeprecationWarning:
distutils Version classes are deprecated. Use packaging.version instead.
/usr/local/lib/python3.10/dist-packages/pandas_datareader/compat/__init__.py:13: DeprecationWarning:
distutils Version classes are deprecated. Use packaging.version instead.
/usr/local/lib/python3.10/dist-packages/pandas_datareader/compat/__init__.py:14: DeprecationWarning:
distutils Version classes are deprecated. Use packaging.version instead.
/usr/local/lib/python3.10/dist-packages/pandas_datareader/compat/__init__.py:15: DeprecationWarning:
distutils Version classes are deprecated. Use packaging.version instead.
/usr/local/lib/python3.10/dist-packages/pip/_vendor/pkg_resources/__init__.py:121: DeprecationWarning:
pkg_resources is deprecated as an API
/usr/local/lib/python3.10/dist-packages/pip/_vendor/pkg_resources/__init__.py:2870: DeprecationWarning:
Deprecated call to `pkg_resources.declare_namespace('google')`.
Implementing implicit namespace packages (as specified in PEP 420) is preferred to `pkg_resources.declare_namespace`. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
/usr/local/lib/python3.10/dist-packages/pip/_vendor/pkg_resources/__init__.py:2870: DeprecationWarning:
Deprecated call to `pkg_resources.declare_namespace('google')`.
Implementing implicit namespace packages (as specified in PEP 420) is preferred to `pkg_resources.declare_namespace`. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
/usr/local/lib/python3.10/dist-packages/pip/_vendor/pkg_resources/__init__.py:2870: DeprecationWarning:
Deprecated call to `pkg_resources.declare_namespace('google.cloud')`.
Implementing implicit namespace packages (as specified in PEP 420) is preferred to `pkg_resources.declare_namespace`. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
/usr/local/lib/python3.10/dist-packages/pip/_vendor/pkg_resources/__init__.py:2349: DeprecationWarning:
Deprecated call to `pkg_resources.declare_namespace('google')`.
Implementing implicit namespace packages (as specified in PEP 420) is preferred to `pkg_resources.declare_namespace`. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
/usr/local/lib/python3.10/dist-packages/pip/_vendor/pkg_resources/__init__.py:2870: DeprecationWarning:
Deprecated call to `pkg_resources.declare_namespace('google')`.
Implementing implicit namespace packages (as specified in PEP 420) is preferred to `pkg_resources.declare_namespace`. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
/usr/local/lib/python3.10/dist-packages/pip/_vendor/pkg_resources/__init__.py:2870: DeprecationWarning:
Deprecated call to `pkg_resources.declare_namespace('google.cloud')`.
Implementing implicit namespace packages (as specified in PEP 420) is preferred to `pkg_resources.declare_namespace`. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
/usr/local/lib/python3.10/dist-packages/pip/_vendor/pkg_resources/__init__.py:2870: DeprecationWarning:
Deprecated call to `pkg_resources.declare_namespace('google')`.
Implementing implicit namespace packages (as specified in PEP 420) is preferred to `pkg_resources.declare_namespace`. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
/usr/local/lib/python3.10/dist-packages/pip/_vendor/pkg_resources/__init__.py:2870: DeprecationWarning:
Deprecated call to `pkg_resources.declare_namespace('google.cloud')`.
Implementing implicit namespace packages (as specified in PEP 420) is preferred to `pkg_resources.declare_namespace`. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
/usr/local/lib/python3.10/dist-packages/pip/_vendor/pkg_resources/__init__.py:2870: DeprecationWarning:
Deprecated call to `pkg_resources.declare_namespace('google')`.
Implementing implicit namespace packages (as specified in PEP 420) is preferred to `pkg_resources.declare_namespace`. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
/usr/local/lib/python3.10/dist-packages/pip/_vendor/pkg_resources/__init__.py:2870: DeprecationWarning:
Deprecated call to `pkg_resources.declare_namespace('google.cloud')`.
Implementing implicit namespace packages (as specified in PEP 420) is preferred to `pkg_resources.declare_namespace`. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
/usr/local/lib/python3.10/dist-packages/pip/_vendor/pkg_resources/__init__.py:2870: DeprecationWarning:
Deprecated call to `pkg_resources.declare_namespace('google')`.
Implementing implicit namespace packages (as specified in PEP 420) is preferred to `pkg_resources.declare_namespace`. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
/usr/local/lib/python3.10/dist-packages/pip/_vendor/pkg_resources/__init__.py:2870: DeprecationWarning:
Deprecated call to `pkg_resources.declare_namespace('google.cloud')`.
Implementing implicit namespace packages (as specified in PEP 420) is preferred to `pkg_resources.declare_namespace`. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
/usr/local/lib/python3.10/dist-packages/pip/_vendor/pkg_resources/__init__.py:2870: DeprecationWarning:
Deprecated call to `pkg_resources.declare_namespace('google')`.
Implementing implicit namespace packages (as specified in PEP 420) is preferred to `pkg_resources.declare_namespace`. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
/usr/local/lib/python3.10/dist-packages/pip/_vendor/pkg_resources/__init__.py:2870: DeprecationWarning:
Deprecated call to `pkg_resources.declare_namespace('google.cloud')`.
Implementing implicit namespace packages (as specified in PEP 420) is preferred to `pkg_resources.declare_namespace`. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
/usr/local/lib/python3.10/dist-packages/pip/_vendor/pkg_resources/__init__.py:2870: DeprecationWarning:
Deprecated call to `pkg_resources.declare_namespace('google')`.
Implementing implicit namespace packages (as specified in PEP 420) is preferred to `pkg_resources.declare_namespace`. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
/usr/local/lib/python3.10/dist-packages/pip/_vendor/pkg_resources/__init__.py:2870: DeprecationWarning:
Deprecated call to `pkg_resources.declare_namespace('google.cloud')`.
Implementing implicit namespace packages (as specified in PEP 420) is preferred to `pkg_resources.declare_namespace`. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
/usr/local/lib/python3.10/dist-packages/pip/_vendor/pkg_resources/__init__.py:2870: DeprecationWarning:
Deprecated call to `pkg_resources.declare_namespace('google')`.
Implementing implicit namespace packages (as specified in PEP 420) is preferred to `pkg_resources.declare_namespace`. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
/usr/local/lib/python3.10/dist-packages/pip/_vendor/pkg_resources/__init__.py:2870: DeprecationWarning:
Deprecated call to `pkg_resources.declare_namespace('google.cloud')`.
Implementing implicit namespace packages (as specified in PEP 420) is preferred to `pkg_resources.declare_namespace`. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
/usr/local/lib/python3.10/dist-packages/pip/_vendor/pkg_resources/__init__.py:2870: DeprecationWarning:
Deprecated call to `pkg_resources.declare_namespace('google')`.
Implementing implicit namespace packages (as specified in PEP 420) is preferred to `pkg_resources.declare_namespace`. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
/usr/local/lib/python3.10/dist-packages/pip/_vendor/pkg_resources/__init__.py:2870: DeprecationWarning:
Deprecated call to `pkg_resources.declare_namespace('google.cloud')`.
Implementing implicit namespace packages (as specified in PEP 420) is preferred to `pkg_resources.declare_namespace`. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
/usr/local/lib/python3.10/dist-packages/pip/_vendor/pkg_resources/__init__.py:2870: DeprecationWarning:
Deprecated call to `pkg_resources.declare_namespace('google')`.
Implementing implicit namespace packages (as specified in PEP 420) is preferred to `pkg_resources.declare_namespace`. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
/usr/local/lib/python3.10/dist-packages/pip/_vendor/pkg_resources/__init__.py:2870: DeprecationWarning:
Deprecated call to `pkg_resources.declare_namespace('google')`.
Implementing implicit namespace packages (as specified in PEP 420) is preferred to `pkg_resources.declare_namespace`. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
/usr/local/lib/python3.10/dist-packages/pip/_vendor/pkg_resources/__init__.py:2870: DeprecationWarning:
Deprecated call to `pkg_resources.declare_namespace('mpl_toolkits')`.
Implementing implicit namespace packages (as specified in PEP 420) is preferred to `pkg_resources.declare_namespace`. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
/usr/local/lib/python3.10/dist-packages/pip/_vendor/pkg_resources/__init__.py:2870: DeprecationWarning:
Deprecated call to `pkg_resources.declare_namespace('google')`.
Implementing implicit namespace packages (as specified in PEP 420) is preferred to `pkg_resources.declare_namespace`. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
/usr/local/lib/python3.10/dist-packages/pip/_vendor/pkg_resources/__init__.py:2870: DeprecationWarning:
Deprecated call to `pkg_resources.declare_namespace('sphinxcontrib')`.
Implementing implicit namespace packages (as specified in PEP 420) is preferred to `pkg_resources.declare_namespace`. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
Python version: 3.10.12 (main, Nov 20 2023, 15:14:05) [GCC 11.4.0]
GEOS version: 3.11.3-CAPI-1.17.3
Numpy version: 1.25.2
/usr/lib/python3.10/pkgutil.py:92: UserWarning: viewer requires Qt
/usr/local/lib/python3.10/dist-packages/tensorboard/_vendor/html5lib/filters/sanitizer.py:29: DeprecationWarning: html5lib's sanitizer is deprecated; see https://github.com/html5lib/html5lib-python/issues/443 and please let us know if Bleach is unsuitable for your needs
/usr/local/lib/python3.10/dist-packages/tensorflow_probability/python/__init__.py:49: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives
/usr/local/lib/python3.10/dist-packages/torch/distributed/_shard/checkpoint/__init__.py:8: DeprecationWarning: torch.distributed._shard.checkpoint will be deprecated, use torch.distributed.checkpoint instead
/usr/local/lib/python3.10/dist-packages/torch/distributed/_sharded_tensor/__init__.py:8: DeprecationWarning: torch.distributed._sharded_tensor will be deprecated, use torch.distributed._shard.sharded_tensor instead
/usr/local/lib/python3.10/dist-packages/torch/distributed/_sharding_spec/__init__.py:8: DeprecationWarning: torch.distributed._sharding_spec will be deprecated, use torch.distributed._shard.sharding_spec instead
No CUDA runtime is found, using CUDA_HOME='/usr/local/cuda'
---------------------------------------------------------------------------
Skipped Traceback (most recent call last)
in <cell line: 4>()
2 import datetime
3 datetime.datetime.now()
----> 4 help('modules')
/usr/lib/python3.10/_sitebuiltins.py in __call__(self, *args, **kwds)
101 def __call__(self, *args, **kwds):
102 import pydoc
--> 103 return pydoc.help(*args, **kwds)
/usr/lib/python3.10/pydoc.py in __call__(self, request)
2011 def __call__(self, request=_GoInteractive):
2012 if request is not self._GoInteractive:
-> 2013 self.help(request)
2014 else:
2015 self.intro()
/usr/lib/python3.10/pydoc.py in help(self, request)
2058 elif request == 'symbols': self.listsymbols()
2059 elif request == 'topics': self.listtopics()
-> 2060 elif request == 'modules': self.listmodules()
2061 elif request[:8] == 'modules ':
2062 self.listmodules(request.split()[1])
/usr/lib/python3.10/pydoc.py in listmodules(self, key)
2210 def onerror(modname):
2211 callback(None, modname, None)
-> 2212 ModuleScanner().run(callback, onerror=onerror)
2213 self.list(modules.keys())
2214 self.output.write('''
/usr/lib/python3.10/pydoc.py in run(self, callback, key, completer, onerror)
2239 callback(None, modname, desc)
2240
-> 2241 for importer, modname, ispkg in pkgutil.walk_packages(onerror=onerror):
2242 if self.quit:
2243 break
/usr/lib/python3.10/pkgutil.py in walk_packages(path, prefix, onerror)
105 path = [p for p in path if not seen(p)]
106
--> 107 yield from walk_packages(path, info.name+'.', onerror)
108
109
/usr/lib/python3.10/pkgutil.py in walk_packages(path, prefix, onerror)
90 if info.ispkg:
91 try:
---> 92 __import__(info.name)
93 except ImportError:
94 if onerror is not None:
/usr/local/lib/python3.10/dist-packages/xgboost/testing/__init__.py in <module>
45 )
46
---> 47 hypothesis = pytest.importorskip("hypothesis")
48
49 # pylint:disable=wrong-import-position,wrong-import-order
/usr/local/lib/python3.10/dist-packages/_pytest/outcomes.py in importorskip(modname, minversion, reason)
294 if reason is None:
295 reason = f"could not import {modname!r}: {exc}"
--> 296 raise Skipped(reason, allow_module_level=True) from None
297 mod = sys.modules[modname]
298 if minversion is None:
Skipped: could not import 'hypothesis': No module named 'hypothesis'
Loop in python
In [ ]:
#while loop program
#print the table using while loop
number=int(input('Enter the any number'))
i=1
while i<11:
print(number * i )
i+=1 #i=i+1
/usr/local/lib/python3.10/dist-packages/ipykernel/ipkernel.py:283: DeprecationWarning: `should_run_async` will not call `transform_cell` automatically in the future. Please pass the result to `transformed_cell` argument and any exception that happen during thetransform in `preprocessing_exc_tuple` in IPython 7.17 and above.
In [ ]:
#while loop program
#print the table using while loop
number=int(input('Enter the any number'))
i=1
while i<11:
print(number,'*',i,'=',number*i )
i += 1
In [ ]:
x=1
while i<3:
print(x)
x+=1
else:
print('limit crossed')
In [ ]:
#while loop program
#print the table using while loop
number=int(input('Enter the any number'))
i=1
while i<11:
print(number * i )
i+=1 #i=i+1
/usr/local/lib/python3.10/dist-packages/ipykernel/ipkernel.py:283: DeprecationWarning: `should_run_async` will not call `transform_cell` automatically in the future. Please pass the result to `transformed_cell` argument and any exception that happen during thetransform in `preprocessing_exc_tuple` in IPython 7.17 and above.
In [ ]:
#while loop program
#print the table using while loop
number=int(input('Enter the any number'))
i=1
while i<11:
print(number,'*',i,'=',number*i )
i += 1
In [ ]:
x=1
while i<3:
print(x)
x+=1
else:
print('limit crossed')
Guessing game
In [ ]:
# guessing game
#we generate a random variable
#first of all we take some ramdom variablr to user
import random
jackport=random.randint(1,100)
guess=int(input('guess any random value'))
counter = 1
while guess != jackport:
if guess
In [ ]:
# guessing game
#we generate a random variable
#first of all we take some ramdom variablr to user
import random
jackport=random.randint(1,100)
guess=int(input('guess any random value'))
counter = 1
while guess != jackport:
if guess
python for loop
In [ ]:
#for loop
for i in range (1,11):
print (i)
In [ ]:
#for loop
for i in range (1,11):
print (i)
Program - The current population of a town is 10000. The population of the town is increasing at the rate of 10% per year. You have to write a program to find out the population at the end of each of the last 10 years.
10 10000 9 9090.90909090909 8 8264.462809917353 7 7513.148009015775 6 6830.134553650703 5 6209.213230591548 4 5644.739300537771 3 5131.5811823070635 2 4665.07380209733 1 4240.976183724845
Sequence sum
1/1! + 2/2! + 3/3! + ...
enter n2 2.0
Nested Loops
1 1 1 2 1 3 1 4 2 1 2 2 2 3 2 4 3 1 3 2 3 3 3 4 4 1 4 2 4 3 4 4
Pattern 1
***
****
***
enter number of rows10 * ** *** **** ***** ****** ******* ******** ********* **********
Pattern 2
1
121
12321
1234321
enter number of rows4 1 121 12321 1234321
Loop Control Statement
BreakContinue
Pass
1 2 3 4
enter lower range10 enter upper range100 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97
1 2 3 4 6 7 8 9
Strings are sequence of Characters
In Python specifically, strings are a sequence of Unicode Characters
Creating StringsAccessing Strings
Adding Chars to Strings
Editing Strings
Deleting Strings
Operations on Strings
String Functions
Creating Stings
hello
"it's raining outside"
Accessing Substrings from a String
--------------------------------------------------------------------------- IndexError Traceback (most recent call last) <ipython-input-61-633ba99ed6e5> in <module> 1 # Positive Indexing 2 s = 'hello world' ----> 3 print(s[41]) IndexError: string index out of range
r
wol
dlrow olleh
dlrow
Editing and Deleting in Strings
--------------------------------------------------------------------------- TypeError Traceback (most recent call last) <ipython-input-80-0c8a824e3b73> in <module> 1 s = 'hello world' ----> 2 s[0] = 'H' TypeError: 'str' object does not support item assignment
--------------------------------------------------------------------------- NameError Traceback (most recent call last) <ipython-input-81-9ae37fbf1c6c> in <module> 1 s = 'hello world' 2 del s ----> 3 print(s) NameError: name 's' is not defined
--------------------------------------------------------------------------- TypeError Traceback (most recent call last) <ipython-input-82-d0d823eafb6b> in <module> 1 s = 'hello world' ----> 2 del s[-1:-5:2] 3 print(s) TypeError: 'str' object does not support item deletion
Operations on Strings
Arithmetic OperationsRelational Operations
Logical Operations
Loops on Strings
Membership Operations
delhi mumbai
delhidelhidelhidelhidelhi
**************************************************
False
False
False
'world'
'hello'
''
'world'
'hello'
'world'
False
h e l l o
pune pune pune pune pune
False
Common Functions
lenmax
min
sorted
11
'w'
' '
['w', 'r', 'o', 'o', 'l', 'l', 'l', 'h', 'e', 'd', ' ']
Capitalize/Title/Upper/Lower/Swapcase
Hello world hello world
'Hello World'
'HELLO WORLD'
'hello wolrd'
'hElLo wORld'
Count/Find/Index
3
-1
--------------------------------------------------------------------------- ValueError Traceback (most recent call last) <ipython-input-121-12e2ad5b75e9> in <module> ----> 1 'my name is nitish'.index('x') ValueError: substring not found
endswith/startswith
False
False
format
'Hi my name is nitish and I am a male'
isalnum/ isalpha/ isdigit/ isidentifier
False
True
False
False
Split/Join
['hi', 'my', 'name', 'is', 'nitish']
'hi my name is nitish'
Replace
'hi my name is nitish'
Strip
'nitish'
Example Programs
enter the stringnitish length of string is 6
enter the emailsupport@campusx.in support
enter the emailhi how are you what would like to search foro frequency 2
enter the stringnitish what would like to removei ntsh
enter the stringpython Not a Palindrome
enter the stringhi how are you ['hi', 'how', 'are', 'you']
enter the stringhi my namE iS NitiSh Hi My Name Is Nitish
enter the number345 345 <class 'str'>
1. Lists
- What are Lists?
- Lists Vs Arrays
- Characterstics of a List
- How to create a list
- Access items from a List
- Editing items in a List
- Deleting items from a List
- Operations on Lists
- Functions on Lists
What are Lists
List is a data type where you can store multiple items under 1 name. More technically, lists act like dynamic arrays which means you can add more items on the fly.
- Why Lists are required in programming?
Array Vs Lists
- Fixed Vs Dynamic Size
- Convenience -> Hetrogeneous
- Speed of Execution
- Memory
140163201133376 11126688 11126720 11126752 11126688 11126720 11126752
How lists are stored in memory
Characterstics of a List
- Ordered
- Changeble/Mutable
- Hetrogeneous
- Can have duplicates
- are dynamic
- can be nested
- items can be accessed
- can contain any kind of objects in python
False
Creating a List
[] [1, 2, 3, 4, 5] [1, 2, 3, [4, 5]] [[[1, 2], [3, 4]], [[5, 6], [7, 8]]] [1, True, 5.6, (5+6j), 'Hello'] ['h', 'e', 'l', 'l', 'o']
Accessing Items from a List
[6, 5, 4, 3, 2, 1]
Adding Items to a List
[1, 2, 3, 4, 5, True]
[1, 2, 3, 4, 5, 6, 7, 8]
[1, 2, 3, 4, 5, [6, 7, 8]]
[1, 2, 3, 4, 5, 'd', 'e', 'l', 'h', 'i']
[1, 100, 2, 3, 4, 5]
Editing items in a List
[1, 200, 300, 400, 500]
Deleting items from a List
[1, 4]
[1, 2, 3, 4]
[1, 2, 3, 4]
[]
Operations on Lists
- Arithmetic
- Membership
- Loop
[1, 2, 3, 4, 5, 6, 7, 8]
[1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4]
False True
[[1, 2], [3, 4]] [[5, 6], [7, 8]]
List Functions
5 0 7 [7, 5, 2, 1, 0]
1
0
[0, 7, 5, 1, 2]
[2, 1, 5, 7, 0] [0, 1, 2, 5, 7] [2, 1, 5, 7, 0] [0, 1, 2, 5, 7]
[2, 1, 5, 7, 0] 140163201056112 [2, 1, 5, 7, 0] 140163201128800
List Comprehension
List Comprehension provides a concise way of creating lists.
newlist = [expression for item in iterable if condition == True]
Advantages of List Comprehension
- More time-efficient and space-efficient than loops.
- Require fewer lines of code.
- Transforms iterative statement into a formula.
[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
[-6, -9, -12]
[1, 4, 9, 16, 25]
[5, 10, 15, 20, 25, 30, 35, 40, 45, 50]
['python', 'php']
['apple']
[[1, 2, 3], [2, 4, 6], [3, 6, 9]]
[5, 6, 7, 8, 10, 12, 14, 16, 15, 18, 21, 24, 20, 24, 28, 32]
2 ways to traverse a list
- itemwise
- indexwise
1 2 3 4
1 2 3 4
Zip
The zip() function returns a zip object, which is an iterator of tuples where the first item in each passed iterator is paired together, and then the second item in each passed iterator are paired together.
If the passed iterators have different lengths, the iterator with the least items decides the length of the new iterator.
[0, 0, 0, 0]
[1, 2, <built-in function print>, <class 'type'>, <bound method Kernel.raw_input of <google.colab._kernel.Kernel object at 0x7f7a67452a90>>]
Disadvantages of Python Lists
- Slow
- Risky usage
- eats up more memory
[1, 2, 3] [1, 2, 3] [1, 2, 3, 4] [1, 2, 3]
List Programs
How to create tuples
<class 'int'>
<class 'tuple'>
(1, 2, 3, 4, 5, 6)
(1, 2, 4, 9, True, [1, 2, 3])
(1, 2, 3, 4, (5, 6, 7))
('R', 'a', 'v', 'i', ' ', 'k', 'u', 'm', 'a', 'r', ' ', 's', 'i', 'n', 'g', 'h')
(5, 4, 3, 2)
Operation on tuple
9517350497,5867483827 95173504979517350497951735049795173504979517350497 9 5 1 7 3 5 0 4 9 7
30
(1, 2, 3, 4) (1, 2, 3)
Accessing items using indexing and slicing
(1, 2, 3, 4, 5, 6, 7, 8) 1 (2, 3, 4, 5)
9
Tuple unpacking is a special syntax.
1 2 3
--------------------------------------------------------------------------- ValueError Traceback (most recent call last) <ipython-input-58-ad0d58a69297> in <cell line: 1>() ----> 1 a,b=(1,2,3) 2 print(a,b,c) # output is error through because values are not equal level. ValueError: too many values to unpack (expected 2)
2 1
1 2 [3, 4, 5, 6, 7, 8]
((1, 3), (2, 4), (3, 5), (4, 6))
Creating a set
set()
<class 'set'>
{1, 2, 3, 4, 5}
{1, 2.45, 2, 5, (6, 7, 8, 9), 'Hello Ravi Kumar Singh'}
{2, 3, 4}
{2, 3, 4, 5, 6, 7}
Deleteing process in set
{1, 2, 3, 4}
{1, 3, 4}
{3, 4}
set()
Operations on set
{4, 5}[5, 4, 3, 1]
{3, 4, 5, 6, 7, 8}
{8, 3, 5, 7}
Frozenset
Frozen set is just an immutable version of python set object
frozenset({1, 2, 3})frozenset({1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12})The frozenset is = frozenset({1, 2, 3, frozenset({4, 5, 6})})
Set Comphernsion
{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}Disconary
Most important topic for data science
{}
{'Name': 'Ravi Kumar Singh', 'roll_no': 2104310100067, 'Gender': 'Male'}
{'name': 'Ravi', 'college': 'aktu', 'sem': '6th', 'Subject': {'Maths': 50, 'DSA': 80, 'electronics': 65}}
{'Name': 'Ravi Kumar Singh', 'Roll no': 2104310100067, 'Age in years': 21, 'Gender': 'Male', 'Student': {'Girls': {'prema': 'pass', 'susma': 'fail'}, 'boys': {'Kapil': 'pass', 'manoj': 'pass', 'karan': 'fail'}}}
Accessing items
'Rahul'
35
2104310100067
{'name': 'Rahul', 'Age': 35, 'Roll no': 2104310100067, 'Gender': 'male'}
{'name': 'Rahul', 'Age': 35, 'Roll no': 2104310100067, 'Gender': 'male', 'Address': 'Laxmipur Dhus ,Hata ,Kushinagar'}
Remove Keyvalue pair
{'name': 'Rahul', 'Roll no': 2104310100067, 'Gender': 'male', 'Address': 'Laxmipur Dhus ,Hata ,Kushinagar'}
{'name': 'Rahul', 'Roll no': 2104310100067}
Discoanry Operator
True
Disconary fumction
['name', 'Roll no']
items ,key ,values
dict_values(['Rahul', 2104310100067])
Update
{1: 2, 3: 5, 4: 19, 7: 8}
Disconary comprehension
{'sunday': 30.5,
'monday': 32.6,
'Tuesday': 31.8,
'Wednesday': 89.5,
'Thursday': 45,
'Friday': 56.6,
'saturday': 37.7}{2: {1: 2, 2: 4, 3: 6, 4: 8, 5: 10, 6: 12, 7: 14, 8: 16, 9: 18, 10: 20},
3: {1: 3, 2: 6, 3: 9, 4: 12, 5: 15, 6: 18, 7: 21, 8: 24, 9: 27, 10: 30},
4: {1: 4, 2: 8, 3: 12, 4: 16, 5: 20, 6: 24, 7: 28, 8: 32, 9: 36, 10: 40}}- Get link
- X
- Other Apps

Comments