Python 3 Basics # 2.2.2 | int() | bin() | oct() | hex() | format() | Number system conversion

Опубликовано: 30 Сентябрь 2024
на канале: technologyCult
841
19

Python 3 Basics # 2.2.2 | int() | bin() | oct() | hex() | format() | Number system conversion
Step 2 -- How to use the format, int, bin, oct and hex function?

Table of Content:
0:00 Introduction
0:20 Approach - Using Python Inbuilt functions
0:40 Explanation of decimal, binary, Octal, Hexadecimal and format functions (Inbuild Python functions)
2:30 Decimal to Octal conversion
2:39 Decimal to Binary conversion
2:51 Decimal to Hexadecimal
3:03 Binary to Decimal
3:33 Binary to Octal
4:04 Binary to Hexadecimal
4:33 Octal to Decimal
4:54 Octal to Binary
5:13 Octal to Hexadecimal
5:40 Hexadecimal to Decimal
6:02 hexadecimal to binary
6:16 hexadecimal to octal

a. How to convert Strings in different bases we will use int() function
with appropriate base.
b. How to convert from decimal to binary, octal and Hexadecimal
c. How to convert from Binary to decimal, octal and hexadecimal
d. How to convert from Octal to binary, decimal and hexadecimal
e. How to convert from Hexadecimal to decimal, binary and octal

format(186,'b')
format(186,'o')
format(186,'x')

1. decimal to octal
oct(186)

2. decimal to binary
bin(186)

3. decimal to hexadecimal
hex(186)

4. binary to decimal
int('0b10111010',2)

5. binary to octal
oct(int('0b10111010',2))

6. binary to hexdecimal
hex(int('0b10111010',2))

7. octal to decimal
int('0o272',8)

8. octal to binary
bin(int('0o272',8))

9. octal to hexadecimal
hex(int('0o272',8))

10. hexadecimal to decimal
int('0xba',16)

11. hexadecimal to binary
bin(int('0xba',16))

12. hexadecimal to octal
oct(int('0xba',16))

All Playlist of this youtube channel
==============================

1. Data Preprocessing in Machine Learning
   • Data Preprocessing in Machine Learnin...  

2. Confusion Matrix in Machine Learning, ML, AI
   • Confusion Matrix in Machine Learning,...  

3. Anaconda, Python Installation, Spyder, Jupyter Notebook, PyCharm, Graphviz
   • Anaconda | Python Installation | Spyd...  

4. Cross Validation, Sampling, train test split in Machine Learning
   • Cross Validation | Sampling | train t...  

5. Drop and Delete Operations in Python Pandas
   • Drop and Delete Operations in Python ...  

6. Matrices and Vectors with python
   • Matrices and Vectors with python  

7. Detect Outliers in Machine Learning
   • Detect Outliers in Machine Learning  

8. TimeSeries preprocessing in Machine Learning
   • TimeSeries preprocessing in Machine L...  

9. Handling Missing Values in Machine Learning
   • Handling Missing Values in Machine Le...  

10. Dummy Encoding Encoding in Machine Learning
   • Label Encoding, One hot Encoding, Dum...  

11. Data Visualisation with Python, Seaborn, Matplotlib
   • Data Visualisation with Python, Matpl...  

12. Feature Scaling in Machine Learning
   • Feature Scaling in Machine Learning  

13. Python 3 basics for Beginner
   • Python | Python 3 Basics | Python for...  

14. Statistics with Python
   • Statistics with Python  

15. Sklearn Scikit Learn Machine Learning
   • Sklearn Scikit Learn Machine Learning  

16. Python Pandas Dataframe Operations
   • Python Pandas Dataframe Operations  

17. Linear Regression, Supervised Machine Learning
   • Linear Regression | Supervised Machin...  

18 Interview Questions on Machine Learning, Artificial Intelligence, Python Pandas and Python Basics
   • Interview Question for Machine Learni...  

19. Jupyter Notebook Operations
   • Jupyter and Spyder Notebook Operation...  

20. Logistic Regresion in Machine Learning, Data Science
   • Logistic Regression | Classification ...  

21. Learn Microsoft Excel Basics
   • Microsoft Excel 2019, 2016, 2013, 201...