{"id":4075,"date":"2022-01-26T13:26:43","date_gmt":"2022-01-26T13:26:43","guid":{"rendered":"https:\/\/ibex.tech\/python\/?p=4075"},"modified":"2025-12-19T10:40:07","modified_gmt":"2025-12-19T10:40:07","slug":"maths-general","status":"publish","type":"post","link":"https:\/\/ibex.tech\/python\/maths-python\/maths-general","title":{"rendered":".Maths general"},"content":{"rendered":"\n<h4 class=\"wp-block-heading\">Increment &amp; Decrement<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>my_value += 1\nmy_value -= 1\n\nmy_value++    #&lt;&lt;Nope, you can't do this in Python!\nmy_value--    #&lt;&lt;Nope, you can't do this in Python!<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">Division<\/h4>\n\n\n\n<p>Python converts all ints to floats before performing division<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Round<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>round(brightness_value, 1)}\"    #Limit value to 1 decimal place<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">Floor<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>import math\n\nmath.floor(1.23)<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Increment &amp; Decrement Division Python converts all ints to floats before performing division Round Floor<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[321],"tags":[],"class_list":["post-4075","post","type-post","status-publish","format-standard","hentry","category-maths-python"],"_links":{"self":[{"href":"https:\/\/ibex.tech\/python\/wp-json\/wp\/v2\/posts\/4075","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ibex.tech\/python\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ibex.tech\/python\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ibex.tech\/python\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/ibex.tech\/python\/wp-json\/wp\/v2\/comments?post=4075"}],"version-history":[{"count":5,"href":"https:\/\/ibex.tech\/python\/wp-json\/wp\/v2\/posts\/4075\/revisions"}],"predecessor-version":[{"id":5004,"href":"https:\/\/ibex.tech\/python\/wp-json\/wp\/v2\/posts\/4075\/revisions\/5004"}],"wp:attachment":[{"href":"https:\/\/ibex.tech\/python\/wp-json\/wp\/v2\/media?parent=4075"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ibex.tech\/python\/wp-json\/wp\/v2\/categories?post=4075"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ibex.tech\/python\/wp-json\/wp\/v2\/tags?post=4075"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}