Python 3 Tutorial: 2 - Math

preview_player
Показать описание
In this tutorial I cover the basics of numbers and math in Python 3, showing you what types of numbers there are, and some simple math operators.
Рекомендации по теме
Комментарии
Автор

The modular thing was a bit hard to understand at first, but then... IT HIT ME! :3
Great tutorials thanks!

MrGogobebe
Автор

Thx man for all this tutrorials.I hope you will still amke them..

asocriss
Автор

@n00bszpro "float" is a decimal (3.1415), "int" is any full positive or negative number, it's short for integer (1, 0, -1, -2), and if you remember back to math class, a complex number has two parts, a real and imaginary in the form "a+bi", with the "a" being the real and "bi" being an imaginary number (the square root of a negative number)

pianoman
Автор

Short and simple. Great for a quick learner... definitely watching the whole series.

ekiMK
Автор

great one thing what is float, int and complex

nbszpro
Автор

I was trying to follow the MIT lectures for python 2.x while trying to learn python 3. It was interesting to have to convert the code they showed to python 3, but I think it'll ultimately be better for me to follow your tutorials, since some of the problems the lecturers mention in py2 (like integer division, comparing strings to integers being a valid expression, etc) are no longer factors in python 3, so me thinking they are and trying to learn how to avoid them would just complicate things.

Rimmer
Автор

Hopefully, you've found this out on your own since writing that comment, but this is one of the differences between Python 2 and 3. It means that you need to upgrade versions if you want to keep following these tutorials.

UmTheMuse
Автор

@NathanEth0 I do see what you mean, but in Python that is not really the case. Python doesn't have a type 'imaginary number, ' and so if you simply put in an imaginary number - say, 5j - Python will regard it as a complex number. So yes, I completely agree that imaginary numbers and complex numbers are different, but in Python that does not hold true

TheMonkeyLords
Автор

Mine doesn't give float when dividing? Should I fix something for that?

Infinitiely
Автор

TheMonkeyLords: It s related to algebra
Me: Can't believe I will need to learn it to learn this coding

Slow_stxrs
Автор

@NathanEth0 Yes, but a complex number is a real number and an imaginary number combined.

TheMonkeyLords
Автор

hey i have a question if anybody can answer..when i divide numbers that come out as floats, the outcome is always one on my compiler, but other divisions are fine..for example. 9/3=3...but when i do 5/3, it equals 1 on my compiler..any suggestions?

pianoman
Автор

All imaginary numbers are complex numbers, because imaginary numbers is a subset of complex numbers.

anubismva
Автор

are you using the version 2.x? mine is giving me an answer 1.75

arthvaaader
Автор

The comment is deleted. He commented in a rude way correcting someone with inaccurate information...

Iwebguru
Автор

Why would anyone on the second video of a basic python tutorial know anything about python?

AlexanderMccarthey
welcome to shbcf.ru