SlideShare a Scribd company logo
1 of 1
Download to read offline
Multiple variables
10
20
30
10
20
20
10
10
10
apple
grapes
banana
type() and isinstance()
int
float
True
(3+6j)
NUMBER SYSTEM
15
239
28
'0b101'
'0o12'
'0xa'
3.0
3.3000000000000003
['BasicContext',
'Clamped',
'Context',
'ConversionSyntax',
'Decimal',
'DecimalException',
'DecimalTuple',
'DefaultContext',
'DivisionByZero',
'DivisionImpossible',
'DivisionUndefined',
'ExtendedContext',
'FloatOperation',
'HAVE_CONTEXTVAR',
'HAVE_THREADS',
'Inexact',
'InvalidContext',
'InvalidOperation',
'MAX_EMAX',
'MAX_PREC',
'MIN_EMIN',
'MIN_ETINY',
'Overflow',
'ROUND_05UP',
'ROUND_CEILING',
'ROUND_DOWN',
'ROUND_FLOOR',
'ROUND_HALF_DOWN',
'ROUND_HALF_EVEN',
'ROUND_HALF_UP',
'ROUND_UP',
'Rounded',
'Subnormal',
'Underflow',
'__builtins__',
'__cached__',
'__doc__',
'__file__',
'__libmpdec_version__',
'__loader__',
'__name__',
'__package__',
'__spec__',
'__version__',
'getcontext',
'localcontext',
'setcontext']
Decimal('0.1000000000000000055511151231257827021181583404541015625')
3.3
2.700
'0xa'
Fractions module
5/2
7
1/3
-11/10
4
1/2
1/5
True
4.0
math module
2.3513752571634776
['__doc__',
'__loader__',
'__name__',
'__package__',
'__spec__',
'acos',
'acosh',
'asin',
'asinh',
'atan',
'atan2',
'atanh',
'ceil',
'comb',
'copysign',
'cos',
'cosh',
'degrees',
'dist',
'e',
'erf',
'erfc',
'exp',
'expm1',
'fabs',
'factorial',
'floor',
'fmod',
'frexp',
'fsum',
'gamma',
'gcd',
'hypot',
'inf',
'isclose',
'isfinite',
'isinf',
'isnan',
'isqrt',
'ldexp',
'lgamma',
'log',
'log10',
'log1p',
'log2',
'modf',
'nan',
'perm',
'pi',
'pow',
'prod',
'radians',
'remainder',
'sin',
'sinh',
'sqrt',
'tan',
'tanh',
'tau',
'trunc']
10000000000.0
4.0
The given number is : 0.05
e^x (using exp() function) is : -0.9487289036239759
10
11
math.modf(x) This method returns the fractional and integer parts of x. It carries the sign of x is float.
(0.5, 34.0)
24
3.141592653589793
2.718281828459045
-inf
6.283185307179586
2.23606797749979
6.0
-0.4480736161291701
random module
19
b
['c', 'b', 'd', 'a', 'e']
0.2671750261707909
['BPF',
'LOG4',
'NV_MAGICCONST',
'RECIP_BPF',
'Random',
'SG_MAGICCONST',
'SystemRandom',
'TWOPI',
'_Sequence',
'_Set',
'__all__',
'__builtins__',
'__cached__',
'__doc__',
'__file__',
'__loader__',
'__name__',
'__package__',
'__spec__',
'_accumulate',
'_acos',
'_bisect',
'_ceil',
'_cos',
'_e',
'_exp',
'_inst',
'_log',
'_os',
'_pi',
'_random',
'_repeat',
'_sha512',
'_sin',
'_sqrt',
'_test',
'_test_generator',
'_urandom',
'_warn',
'betavariate',
'choice',
'choices',
'expovariate',
'gammavariate',
'gauss',
'getrandbits',
'getstate',
'lognormvariate',
'normalvariate',
'paretovariate',
'randint',
'random',
'randrange',
'sample',
'seed',
'setstate',
'shuffle',
'triangular',
'uniform',
'vonmisesvariate',
'weibullvariate']
In [2]:
x,y,z=10,20,30
print(x)
print(y)
print(z)
In [3]:
a=10;b=20;c=20
print(a)
print(b)
print(c)
In [4]:
a=b=c=10
In [5]:
a
Out[5]:
In [6]:
b
Out[6]:
In [7]:
c
Out[7]:
In [10]:
fruits=['apple','grapes','banana']
In [11]:
p,q,r=fruits
In [13]:
print(p)
print(q)
print(r)
In [15]:
a=15
type(a)
Out[15]:
In [17]:
type(6.7)
Out[17]:
In [20]:
y=3+5j
print(isinstance(y,complex))
In [125…
complex(3,6)
Out[125…
In [30]:
print(0b1111)
In [32]:
0xef
Out[32]:
In [34]:
0o34
Out[34]:
In [35]:
bin(5)
Out[35]:
In [37]:
oct(10)
Out[37]:
In [39]:
hex(10)
Out[39]:
In [18]:
1+2.0
Out[18]:
In [20]:
1.1+2.2
Out[20]:
In [12]:
import decimal
decimal.Decimal(1.1)
dir(decimal)
Out[12]:
In [14]:
from decimal import Decimal as D
In [26]:
0.1
decimal.Decimal(0.1)
Out[26]:
In [16]:
print(D('1.1') + D('2.2'))
print(D('1.2') * D('2.25'))
In [6]:
num1 = 0b100
num2 = 0b110
hex(num1+num2)
Out[6]:
In [44]:
import fractions
print(fractions.Fraction(2.5))
print(fractions.Fraction(7))
print(fractions.Fraction(1,3))
print(fractions.Fraction('-1.1'))
In [47]:
from fractions import Fraction as F
print(F(6, 3) + F(6, 3))
print(1 / F(6,3))
print(F(2, 10))
print(F(-2, 10) < 0)
In [49]:
6/3+6/3
Out[49]:
In [ ]:
In [17]:
import math as m
a=10.5
c=m.log(a)
c
Out[17]:
In [19]:
dir(m)
Out[19]:
In [82]:
m.pow(10,10)
Out[82]:
In [83]:
m.sqrt(16)
Out[83]:
In [81]:
number = 5e-2
print('The given number is :', number)
print('e^x (using exp() function) is :', math.exp(number)-2)
In [24]:
q=10.6
m.floor(q)
Out[24]:
In [22]:
m.ceil(q)
Out[22]:
In [89]:
math.modf(34.5)
Out[89]:
In [90]:
math.factorial(4)
Out[90]:
In [101…
print(m.pi)
print(m.e)
print(-m.inf)
print(m.tau)
In [27]:
p=[7,5]
q=[5,6]
m.dist(q,p)
Out[27]:
In [123…
print(m.gamma(4))
print(m.cos(90))
In [34]:
import random
print(random.randrange(10, 20))
x = ['a', 'b', 'c', 'd', 'e']
# Get random choice
print(random.choice(x))
# Shuffle x
random.shuffle(x)
# Print the shuffled x
print(x)
# Print random element
print(random.random())
In [93]:
dir(random)
Out[93]:
In [ ]:

More Related Content

Recently uploaded

reStartEvents 5:9 DC metro & Beyond V-Career Fair Employer Directory.pdf
reStartEvents 5:9 DC metro & Beyond V-Career Fair Employer Directory.pdfreStartEvents 5:9 DC metro & Beyond V-Career Fair Employer Directory.pdf
reStartEvents 5:9 DC metro & Beyond V-Career Fair Employer Directory.pdfKen Fuller
 
Launch Your Research Career: A Beginner's Guide
Launch Your Research Career: A Beginner's GuideLaunch Your Research Career: A Beginner's Guide
Launch Your Research Career: A Beginner's GuideKaziFaisalAlam
 
Novo Nordisk Kalundborg. We are expanding our manufacturing hub in Kalundborg...
Novo Nordisk Kalundborg. We are expanding our manufacturing hub in Kalundborg...Novo Nordisk Kalundborg. We are expanding our manufacturing hub in Kalundborg...
Novo Nordisk Kalundborg. We are expanding our manufacturing hub in Kalundborg...Juli Boned
 
Top profile Call Girls In chittoor [ 7014168258 ] Call Me For Genuine Models ...
Top profile Call Girls In chittoor [ 7014168258 ] Call Me For Genuine Models ...Top profile Call Girls In chittoor [ 7014168258 ] Call Me For Genuine Models ...
Top profile Call Girls In chittoor [ 7014168258 ] Call Me For Genuine Models ...gajnagarg
 
一比一定(购)堪培拉大学毕业证(UC毕业证)成绩单学位证
一比一定(购)堪培拉大学毕业证(UC毕业证)成绩单学位证一比一定(购)堪培拉大学毕业证(UC毕业证)成绩单学位证
一比一定(购)堪培拉大学毕业证(UC毕业证)成绩单学位证eqaqen
 
K Venkat Naveen Kumar | GCP Data Engineer | CV
K Venkat Naveen Kumar | GCP Data Engineer | CVK Venkat Naveen Kumar | GCP Data Engineer | CV
K Venkat Naveen Kumar | GCP Data Engineer | CVK VENKAT NAVEEN KUMAR
 
Top profile Call Girls In Ratnagiri [ 7014168258 ] Call Me For Genuine Models...
Top profile Call Girls In Ratnagiri [ 7014168258 ] Call Me For Genuine Models...Top profile Call Girls In Ratnagiri [ 7014168258 ] Call Me For Genuine Models...
Top profile Call Girls In Ratnagiri [ 7014168258 ] Call Me For Genuine Models...gajnagarg
 
Specialize in a MSc within Biomanufacturing, and work part-time as Process En...
Specialize in a MSc within Biomanufacturing, and work part-time as Process En...Specialize in a MSc within Biomanufacturing, and work part-time as Process En...
Specialize in a MSc within Biomanufacturing, and work part-time as Process En...Juli Boned
 
drug book file on obs. and gynae clinical pstings
drug book file on obs. and gynae clinical pstingsdrug book file on obs. and gynae clinical pstings
drug book file on obs. and gynae clinical pstingsKarishma7720
 
Top profile Call Girls In daman [ 7014168258 ] Call Me For Genuine Models We ...
Top profile Call Girls In daman [ 7014168258 ] Call Me For Genuine Models We ...Top profile Call Girls In daman [ 7014168258 ] Call Me For Genuine Models We ...
Top profile Call Girls In daman [ 7014168258 ] Call Me For Genuine Models We ...gajnagarg
 
<DUBAI>Abortion pills IN UAE {{+971561686603*^Mifepristone & Misoprostol in D...
<DUBAI>Abortion pills IN UAE {{+971561686603*^Mifepristone & Misoprostol in D...<DUBAI>Abortion pills IN UAE {{+971561686603*^Mifepristone & Misoprostol in D...
<DUBAI>Abortion pills IN UAE {{+971561686603*^Mifepristone & Misoprostol in D...gynedubai
 
怎样办理宾夕法尼亚大学毕业证(UPenn毕业证书)成绩单学校原版复制
怎样办理宾夕法尼亚大学毕业证(UPenn毕业证书)成绩单学校原版复制怎样办理宾夕法尼亚大学毕业证(UPenn毕业证书)成绩单学校原版复制
怎样办理宾夕法尼亚大学毕业证(UPenn毕业证书)成绩单学校原版复制yynod
 
Guide to a Winning Interview May 2024 for MCWN
Guide to a Winning Interview May 2024 for MCWNGuide to a Winning Interview May 2024 for MCWN
Guide to a Winning Interview May 2024 for MCWNBruce Bennett
 
Mysore Escorts Service Girl ^ 9332606886, WhatsApp Anytime Mysore
Mysore Escorts Service Girl ^ 9332606886, WhatsApp Anytime MysoreMysore Escorts Service Girl ^ 9332606886, WhatsApp Anytime Mysore
Mysore Escorts Service Girl ^ 9332606886, WhatsApp Anytime Mysoremeghakumariji156
 
Top profile Call Girls In Shivamogga [ 7014168258 ] Call Me For Genuine Model...
Top profile Call Girls In Shivamogga [ 7014168258 ] Call Me For Genuine Model...Top profile Call Girls In Shivamogga [ 7014168258 ] Call Me For Genuine Model...
Top profile Call Girls In Shivamogga [ 7014168258 ] Call Me For Genuine Model...nirzagarg
 
B.tech civil major project by Deepak Kumar
B.tech civil major project by Deepak KumarB.tech civil major project by Deepak Kumar
B.tech civil major project by Deepak KumarDeepak15CivilEngg
 
Brand Analysis for reggaeton artist Jahzel.
Brand Analysis for reggaeton artist Jahzel.Brand Analysis for reggaeton artist Jahzel.
Brand Analysis for reggaeton artist Jahzel.GabrielaMiletti
 
Top profile Call Girls In Gangtok [ 7014168258 ] Call Me For Genuine Models W...
Top profile Call Girls In Gangtok [ 7014168258 ] Call Me For Genuine Models W...Top profile Call Girls In Gangtok [ 7014168258 ] Call Me For Genuine Models W...
Top profile Call Girls In Gangtok [ 7014168258 ] Call Me For Genuine Models W...gajnagarg
 
DMER-AYUSH-MIMS-Staff-Nurse-_Selection-List-04-05-2024.pdf
DMER-AYUSH-MIMS-Staff-Nurse-_Selection-List-04-05-2024.pdfDMER-AYUSH-MIMS-Staff-Nurse-_Selection-List-04-05-2024.pdf
DMER-AYUSH-MIMS-Staff-Nurse-_Selection-List-04-05-2024.pdfReemaKhan31
 

Recently uploaded (20)

reStartEvents 5:9 DC metro & Beyond V-Career Fair Employer Directory.pdf
reStartEvents 5:9 DC metro & Beyond V-Career Fair Employer Directory.pdfreStartEvents 5:9 DC metro & Beyond V-Career Fair Employer Directory.pdf
reStartEvents 5:9 DC metro & Beyond V-Career Fair Employer Directory.pdf
 
Launch Your Research Career: A Beginner's Guide
Launch Your Research Career: A Beginner's GuideLaunch Your Research Career: A Beginner's Guide
Launch Your Research Career: A Beginner's Guide
 
Novo Nordisk Kalundborg. We are expanding our manufacturing hub in Kalundborg...
Novo Nordisk Kalundborg. We are expanding our manufacturing hub in Kalundborg...Novo Nordisk Kalundborg. We are expanding our manufacturing hub in Kalundborg...
Novo Nordisk Kalundborg. We are expanding our manufacturing hub in Kalundborg...
 
Top profile Call Girls In chittoor [ 7014168258 ] Call Me For Genuine Models ...
Top profile Call Girls In chittoor [ 7014168258 ] Call Me For Genuine Models ...Top profile Call Girls In chittoor [ 7014168258 ] Call Me For Genuine Models ...
Top profile Call Girls In chittoor [ 7014168258 ] Call Me For Genuine Models ...
 
一比一定(购)堪培拉大学毕业证(UC毕业证)成绩单学位证
一比一定(购)堪培拉大学毕业证(UC毕业证)成绩单学位证一比一定(购)堪培拉大学毕业证(UC毕业证)成绩单学位证
一比一定(购)堪培拉大学毕业证(UC毕业证)成绩单学位证
 
K Venkat Naveen Kumar | GCP Data Engineer | CV
K Venkat Naveen Kumar | GCP Data Engineer | CVK Venkat Naveen Kumar | GCP Data Engineer | CV
K Venkat Naveen Kumar | GCP Data Engineer | CV
 
Cara Gugurkan Kandungan Awal Kehamilan 1 bulan (087776558899)
Cara Gugurkan Kandungan Awal Kehamilan 1 bulan (087776558899)Cara Gugurkan Kandungan Awal Kehamilan 1 bulan (087776558899)
Cara Gugurkan Kandungan Awal Kehamilan 1 bulan (087776558899)
 
Top profile Call Girls In Ratnagiri [ 7014168258 ] Call Me For Genuine Models...
Top profile Call Girls In Ratnagiri [ 7014168258 ] Call Me For Genuine Models...Top profile Call Girls In Ratnagiri [ 7014168258 ] Call Me For Genuine Models...
Top profile Call Girls In Ratnagiri [ 7014168258 ] Call Me For Genuine Models...
 
Specialize in a MSc within Biomanufacturing, and work part-time as Process En...
Specialize in a MSc within Biomanufacturing, and work part-time as Process En...Specialize in a MSc within Biomanufacturing, and work part-time as Process En...
Specialize in a MSc within Biomanufacturing, and work part-time as Process En...
 
drug book file on obs. and gynae clinical pstings
drug book file on obs. and gynae clinical pstingsdrug book file on obs. and gynae clinical pstings
drug book file on obs. and gynae clinical pstings
 
Top profile Call Girls In daman [ 7014168258 ] Call Me For Genuine Models We ...
Top profile Call Girls In daman [ 7014168258 ] Call Me For Genuine Models We ...Top profile Call Girls In daman [ 7014168258 ] Call Me For Genuine Models We ...
Top profile Call Girls In daman [ 7014168258 ] Call Me For Genuine Models We ...
 
<DUBAI>Abortion pills IN UAE {{+971561686603*^Mifepristone & Misoprostol in D...
<DUBAI>Abortion pills IN UAE {{+971561686603*^Mifepristone & Misoprostol in D...<DUBAI>Abortion pills IN UAE {{+971561686603*^Mifepristone & Misoprostol in D...
<DUBAI>Abortion pills IN UAE {{+971561686603*^Mifepristone & Misoprostol in D...
 
怎样办理宾夕法尼亚大学毕业证(UPenn毕业证书)成绩单学校原版复制
怎样办理宾夕法尼亚大学毕业证(UPenn毕业证书)成绩单学校原版复制怎样办理宾夕法尼亚大学毕业证(UPenn毕业证书)成绩单学校原版复制
怎样办理宾夕法尼亚大学毕业证(UPenn毕业证书)成绩单学校原版复制
 
Guide to a Winning Interview May 2024 for MCWN
Guide to a Winning Interview May 2024 for MCWNGuide to a Winning Interview May 2024 for MCWN
Guide to a Winning Interview May 2024 for MCWN
 
Mysore Escorts Service Girl ^ 9332606886, WhatsApp Anytime Mysore
Mysore Escorts Service Girl ^ 9332606886, WhatsApp Anytime MysoreMysore Escorts Service Girl ^ 9332606886, WhatsApp Anytime Mysore
Mysore Escorts Service Girl ^ 9332606886, WhatsApp Anytime Mysore
 
Top profile Call Girls In Shivamogga [ 7014168258 ] Call Me For Genuine Model...
Top profile Call Girls In Shivamogga [ 7014168258 ] Call Me For Genuine Model...Top profile Call Girls In Shivamogga [ 7014168258 ] Call Me For Genuine Model...
Top profile Call Girls In Shivamogga [ 7014168258 ] Call Me For Genuine Model...
 
B.tech civil major project by Deepak Kumar
B.tech civil major project by Deepak KumarB.tech civil major project by Deepak Kumar
B.tech civil major project by Deepak Kumar
 
Brand Analysis for reggaeton artist Jahzel.
Brand Analysis for reggaeton artist Jahzel.Brand Analysis for reggaeton artist Jahzel.
Brand Analysis for reggaeton artist Jahzel.
 
Top profile Call Girls In Gangtok [ 7014168258 ] Call Me For Genuine Models W...
Top profile Call Girls In Gangtok [ 7014168258 ] Call Me For Genuine Models W...Top profile Call Girls In Gangtok [ 7014168258 ] Call Me For Genuine Models W...
Top profile Call Girls In Gangtok [ 7014168258 ] Call Me For Genuine Models W...
 
DMER-AYUSH-MIMS-Staff-Nurse-_Selection-List-04-05-2024.pdf
DMER-AYUSH-MIMS-Staff-Nurse-_Selection-List-04-05-2024.pdfDMER-AYUSH-MIMS-Staff-Nurse-_Selection-List-04-05-2024.pdf
DMER-AYUSH-MIMS-Staff-Nurse-_Selection-List-04-05-2024.pdf
 

Featured

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by HubspotMarius Sescu
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTExpeed Software
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsPixeldarts
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 

Featured (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 

Practical approach on numbers system and math module

  • 1. Multiple variables 10 20 30 10 20 20 10 10 10 apple grapes banana type() and isinstance() int float True (3+6j) NUMBER SYSTEM 15 239 28 '0b101' '0o12' '0xa' 3.0 3.3000000000000003 ['BasicContext', 'Clamped', 'Context', 'ConversionSyntax', 'Decimal', 'DecimalException', 'DecimalTuple', 'DefaultContext', 'DivisionByZero', 'DivisionImpossible', 'DivisionUndefined', 'ExtendedContext', 'FloatOperation', 'HAVE_CONTEXTVAR', 'HAVE_THREADS', 'Inexact', 'InvalidContext', 'InvalidOperation', 'MAX_EMAX', 'MAX_PREC', 'MIN_EMIN', 'MIN_ETINY', 'Overflow', 'ROUND_05UP', 'ROUND_CEILING', 'ROUND_DOWN', 'ROUND_FLOOR', 'ROUND_HALF_DOWN', 'ROUND_HALF_EVEN', 'ROUND_HALF_UP', 'ROUND_UP', 'Rounded', 'Subnormal', 'Underflow', '__builtins__', '__cached__', '__doc__', '__file__', '__libmpdec_version__', '__loader__', '__name__', '__package__', '__spec__', '__version__', 'getcontext', 'localcontext', 'setcontext'] Decimal('0.1000000000000000055511151231257827021181583404541015625') 3.3 2.700 '0xa' Fractions module 5/2 7 1/3 -11/10 4 1/2 1/5 True 4.0 math module 2.3513752571634776 ['__doc__', '__loader__', '__name__', '__package__', '__spec__', 'acos', 'acosh', 'asin', 'asinh', 'atan', 'atan2', 'atanh', 'ceil', 'comb', 'copysign', 'cos', 'cosh', 'degrees', 'dist', 'e', 'erf', 'erfc', 'exp', 'expm1', 'fabs', 'factorial', 'floor', 'fmod', 'frexp', 'fsum', 'gamma', 'gcd', 'hypot', 'inf', 'isclose', 'isfinite', 'isinf', 'isnan', 'isqrt', 'ldexp', 'lgamma', 'log', 'log10', 'log1p', 'log2', 'modf', 'nan', 'perm', 'pi', 'pow', 'prod', 'radians', 'remainder', 'sin', 'sinh', 'sqrt', 'tan', 'tanh', 'tau', 'trunc'] 10000000000.0 4.0 The given number is : 0.05 e^x (using exp() function) is : -0.9487289036239759 10 11 math.modf(x) This method returns the fractional and integer parts of x. It carries the sign of x is float. (0.5, 34.0) 24 3.141592653589793 2.718281828459045 -inf 6.283185307179586 2.23606797749979 6.0 -0.4480736161291701 random module 19 b ['c', 'b', 'd', 'a', 'e'] 0.2671750261707909 ['BPF', 'LOG4', 'NV_MAGICCONST', 'RECIP_BPF', 'Random', 'SG_MAGICCONST', 'SystemRandom', 'TWOPI', '_Sequence', '_Set', '__all__', '__builtins__', '__cached__', '__doc__', '__file__', '__loader__', '__name__', '__package__', '__spec__', '_accumulate', '_acos', '_bisect', '_ceil', '_cos', '_e', '_exp', '_inst', '_log', '_os', '_pi', '_random', '_repeat', '_sha512', '_sin', '_sqrt', '_test', '_test_generator', '_urandom', '_warn', 'betavariate', 'choice', 'choices', 'expovariate', 'gammavariate', 'gauss', 'getrandbits', 'getstate', 'lognormvariate', 'normalvariate', 'paretovariate', 'randint', 'random', 'randrange', 'sample', 'seed', 'setstate', 'shuffle', 'triangular', 'uniform', 'vonmisesvariate', 'weibullvariate'] In [2]: x,y,z=10,20,30 print(x) print(y) print(z) In [3]: a=10;b=20;c=20 print(a) print(b) print(c) In [4]: a=b=c=10 In [5]: a Out[5]: In [6]: b Out[6]: In [7]: c Out[7]: In [10]: fruits=['apple','grapes','banana'] In [11]: p,q,r=fruits In [13]: print(p) print(q) print(r) In [15]: a=15 type(a) Out[15]: In [17]: type(6.7) Out[17]: In [20]: y=3+5j print(isinstance(y,complex)) In [125… complex(3,6) Out[125… In [30]: print(0b1111) In [32]: 0xef Out[32]: In [34]: 0o34 Out[34]: In [35]: bin(5) Out[35]: In [37]: oct(10) Out[37]: In [39]: hex(10) Out[39]: In [18]: 1+2.0 Out[18]: In [20]: 1.1+2.2 Out[20]: In [12]: import decimal decimal.Decimal(1.1) dir(decimal) Out[12]: In [14]: from decimal import Decimal as D In [26]: 0.1 decimal.Decimal(0.1) Out[26]: In [16]: print(D('1.1') + D('2.2')) print(D('1.2') * D('2.25')) In [6]: num1 = 0b100 num2 = 0b110 hex(num1+num2) Out[6]: In [44]: import fractions print(fractions.Fraction(2.5)) print(fractions.Fraction(7)) print(fractions.Fraction(1,3)) print(fractions.Fraction('-1.1')) In [47]: from fractions import Fraction as F print(F(6, 3) + F(6, 3)) print(1 / F(6,3)) print(F(2, 10)) print(F(-2, 10) < 0) In [49]: 6/3+6/3 Out[49]: In [ ]: In [17]: import math as m a=10.5 c=m.log(a) c Out[17]: In [19]: dir(m) Out[19]: In [82]: m.pow(10,10) Out[82]: In [83]: m.sqrt(16) Out[83]: In [81]: number = 5e-2 print('The given number is :', number) print('e^x (using exp() function) is :', math.exp(number)-2) In [24]: q=10.6 m.floor(q) Out[24]: In [22]: m.ceil(q) Out[22]: In [89]: math.modf(34.5) Out[89]: In [90]: math.factorial(4) Out[90]: In [101… print(m.pi) print(m.e) print(-m.inf) print(m.tau) In [27]: p=[7,5] q=[5,6] m.dist(q,p) Out[27]: In [123… print(m.gamma(4)) print(m.cos(90)) In [34]: import random print(random.randrange(10, 20)) x = ['a', 'b', 'c', 'd', 'e'] # Get random choice print(random.choice(x)) # Shuffle x random.shuffle(x) # Print the shuffled x print(x) # Print random element print(random.random()) In [93]: dir(random) Out[93]: In [ ]: