Overclock.net - An Overclocking Community - View Single Post - What is this? Not a string..

View Single Post
post #25 of (permalink) Old 10-26-2018, 02:56 AM
JackCY
Overclocker
 
JackCY's Avatar
 
Join Date: Jun 2014
Posts: 9,893
Rep: 337 (Unique: 240)
Simple, what's the problem really, might need to take a different class before Python, one about math and logic.

Quote:
2 ** 3 == 108 % 100 or 'Cleese' == 'King Arthur'
2 ** 3 or also written as 2^3 is 2*2*2 = 8
108 % 100 or also written as 108 mod 100, 108 modulo 100 is 108 % 100 = 8, aka remove 100 as many times as it fits

8 == 8, "8 equals? 8" True

"'Cleese' equals? 'King Arthur'" False

True OR False is True

Done.

I think a python guide/documentation shows all this. Try this guide: https://www.learnpython.org/en/Basic_Operators


Wikipedia math articles are often written as they should be, as in fairly top level math not the annoyingly oversimplified elementary/high school kind of math. I'm not saying it's easy to read but there is a reason it's written that way because it can express all the nuances and cases and everyone uses that. Of course it doesn't have to be written and explained incomprehensibly, that's true, even using the harder to read math for common people it can be explained sensibly. Personally I was happy when the oversimplified below University level math was gone, sure deciphering some of the math at high University level is difficult but then it's a difficult math too and most people won't even see it in their whole life.

Last edited by JackCY; 10-26-2018 at 03:01 AM.
JackCY is offline