26 Sep 2022 Funvtion Incomplete - Jupyter Notebook

Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

11/29/22, 10:29 AM 26 Sep 2022 funvtion incomplete - Jupyter Notebook

# Lamda Function
#Modules: They are the .py extension files that contain python codes defining functions.
classes, variables etc.,
#with a suffix .py appended in the file name
#They can have different functions, variables, classes etc in one file.
#Also call them libraries
#Reduce redundancyin the code
#Uniformity in coding style
#to find the list of modules use help('modules')

In [1]:

help('modules')

Please wait a moment while I gather a list of all available modules...

WARNING: AstropyDeprecationWarning: The private astropy._erfa module has b


een made into its own package, pyerfa, which is a dependency of astropy an
d can be imported directly using "import erfa" [astropy._erfa]
Matplotlib is building the font cache; this may take a moment.
C:\Users\stjos\anaconda3\lib\site-packages\nltk\twitter\__init__.py:20: Us
erWarning: The twython library has not been installed. Some functionality
from the twitter package will not be available.
warnings.warn(
C:\Users\stjos\anaconda3\lib\site-packages\_distutils_hack\__init__.py:30:
UserWarning: Setuptools is replacing distutils.
warnings.warn("Setuptools is replacing distutils.")

Update LANGUAGE_CODES (inside config/base.py) if a new translation has bee


n added to Spyder

No QCoreApplication instance found. Application patches not applied. You h

In [1]:

import math;

In [4]:

from math import sum;

---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
Input In [4], in <cell line: 1>()
----> 1 from math import sum

ImportError: cannot import name 'sum' from 'math' (unknown location)

In [2]:

import math;
print(math.factorial(10))

3628800

localhost:8888/notebooks/26 Sep 2022 funvtion incomplete.ipynb 1/4


11/29/22, 10:29 AM 26 Sep 2022 funvtion incomplete - Jupyter Notebook

In [6]:

dir()

Out[6]:

['In',
'Out',
'_',
'_5',
'__',
'___',
'__builtin__',
'__builtins__',
'__doc__',
'__loader__',
'__name__',
'__package__',
'__spec__',
'_dh',
'_i',
'_i1',
'_i2',
'_i3',
'_i4',
'_i5',
'_i6',
'_ih',
'_ii',
'_iii',
'_oh',
'exit',
'get_ipython',
'math',
'quit']

In [12]:

from math import factorial


print(math.factorial(10))

3628800

localhost:8888/notebooks/26 Sep 2022 funvtion incomplete.ipynb 2/4


11/29/22, 10:29 AM 26 Sep 2022 funvtion incomplete - Jupyter Notebook

In [ ]:

help()

Welcome to Python 3.9's help utility!

If this is your first time using Python, you should definitely check out
the tutorial on the Internet at https://docs.python.org/3.9/tutorial/. (ht
tps://docs.python.org/3.9/tutorial/.)

Enter the name of any module, keyword, or topic to get help on writing
Python programs and using Python modules. To quit this help utility and
return to the interpreter, just type "quit".

To get a list of available modules, keywords, symbols, or topics, type


"modules", "keywords", "symbols", or "topics". Each module also comes
with a one-line summary of what it does; to list the modules whose name
or summary contain a given string such as "spam", type "modules spam".

help> math
Help on built-in module math:

NAME
In [7]:

from math import cos


cos(23)

Out[7]:

-0.5328330203333975

In [12]:

import datetime
x=datetime.datetime.now()
print (x)

---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
Input In [12], in <cell line: 2>()
1 import datetime
----> 2 x=datetime.now()
3 print (x)

AttributeError: module 'datetime' has no attribute 'now'

In [25]:

import random
r1=random.randint(0,19)
print(r1)

13

localhost:8888/notebooks/26 Sep 2022 funvtion incomplete.ipynb 3/4


11/29/22, 10:29 AM 26 Sep 2022 funvtion incomplete - Jupyter Notebook

In [10]:

from math import sin


sin(30)

Out[10]:

-0.9880316240928618

In [19]:

import random
r=random.randint(12,22)
print(r)

14

In [4]:

from math import tan


a=tan(30)
print(a)

-6.405331196646276

In [ ]:

In [ ]:

In [ ]:

In [ ]:

localhost:8888/notebooks/26 Sep 2022 funvtion incomplete.ipynb 4/4

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy