From the course: Certified Entry-Level Python Programmer (PCEP-30-02) Cert Prep
Unlock the full course today
Join today to access over 24,500 courses taught by industry experts.
Defining numerical representations - Python Tutorial
From the course: Certified Entry-Level Python Programmer (PCEP-30-02) Cert Prep
Defining numerical representations
- [Presenter] Let's talk a little bit about numerical representations. So littles for numbers, let's start talking about integer numbers. So the int type. We can express integer numbers in the decimal notation. That's typically the standard one. For example, if you say three or minus 89, that's the decimal notation. We can also use the binary notation. In this case, we use zero B as a prefix, and then the binary number. So we can only use zeros and ones. We also have the octal notation, that in python, it's zero, lowercase o for octal. And then the number that should contain the sheets only from zero to seven. And finally, we have the hexadecimal notation. That is zero x and the digits. In this case, digits will go from zero to nine, adding A, B, C, D, E, and F as possibilities because we need 16 digits to represent addition. To convert from binary to decimal. This is how it works. This is the formula. Let's…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
Fundamentals of Python12m 52s
-
(Locked)
Writing and executing Python code12m 46s
-
(Locked)
Python code structure10m 32s
-
(Locked)
PEP 8 style guidelines and indentation4m 30s
-
(Locked)
Variables and literals10m 55s
-
(Locked)
Output messages to the console4m 7s
-
(Locked)
Defining numerical representations9m 30s
-
(Locked)
Working with strings12m 14s
-
(Locked)
Using operators8m 57s
-
(Locked)
Receiving input data from the console5m 52s
-
-
-
-
-