06 - Number Data Types ( int; float; complex ) | Python Tutorials

preview_player
Показать описание
In python all data types are objects. This video goes over the number data types int, float, and complex. We'll talk about what an object exactly is in a later video.

| Language
Python (.py)

| Code Example
Рекомендации по теме
Комментарии
Автор

Dang, I knew I was forgetting something. Float can also represent positive and negative infinity, and not a number (NaN)

positive_infinity = float("Infinity") # or float("inf") or float("+inf")
negative_infinity = float("-Infinity") # or float("-inf")
not_a_number = float("nan")

print( "Positive Infinity is represented by:", positive_infinity )
print( "Negative Infinity is represented by:", negative_infinity )
print( "A value that is not a number is represented by:", not_a_number )

And you can use underscores to group numbers without affecting them similar to how we use commas in real life.

print( 498_131_001_500 ) # much easier to read than
print( 498131001500 )

SimplyCoded
Автор

Please tell me how can i set up my VS code just like as simple as yours?

rishabhtomar
Автор

what is numerator and denominator ???

roy
Автор

at 6:20 you said "the square root of negative one" that is like dividing by zero - it's impossible

georgibaldjiev
join shbcf.ru