But then with Python we can have more complex “formulas”. For example, we can say laugh = “Ho” * 3
Yeah, you can multiply a string. The result is that print(laugh) prints “HoHoHo”.
Okay, that's just fucking cool. :3
But then with Python we can have more complex “formulas”. For example, we can say laugh = “Ho” * 3
Yeah, you can multiply a string. The result is that print(laugh) prints “HoHoHo”.
Okay, that's just fucking cool. :3
That's a good point! That is something I've noticed. Traditional mathematics uses PEMDAS, which is bidirectional, but Python uses...PEMDRAS, I guess, which is...bi-monodirectional(?), that is, left-to-right in all cases, except in the exception of variables which is right-to-left.
I swear this makes sense to me. My brain just thinks weirdly. Haha.
Even if the title is 100% accurate to the content of the video, the title is still clickbaity, as it definitely has emotional language in it designed to capture the attention of viewers. Also, the exclamation mark.
Oh!
I think I've not quite gotten to that part yet in the lesson. Lol.
But it's good to know, so thanks for pointing that out! I'll be sure to remember it when I get to that point. Haha.
That's pretty cool. It's almost like a...time-based Excel function! Lol.
That's so cool! Thank you!
...I am confuzzled and slightly afraid. :|
So input(x) prints out x and then puts itself into a waiting mode of sorts, waiting for the user to supply a value, and then once it has that value it outputs that particular value.
Am I right?
I think I misworded my thoughts, to be honest.
As I understand it:
int(2.1) would print out 2 since it just converts it to an integer by truncating it.
float(2) would print out 2.0 since it just converts it to a floating-point value by appending a .0 to the end.
Goddammit why are there so many YouTube videos being posted lately...?