{"id":1935,"date":"2021-10-07T20:00:45","date_gmt":"2021-10-07T11:00:45","guid":{"rendered":"https:\/\/e-sys.denshin.org\/blog\/?p=1935"},"modified":"2021-10-07T21:30:43","modified_gmt":"2021-10-07T12:30:43","slug":"types-of-numbers","status":"publish","type":"post","link":"https:\/\/e-sys.ntsl.net\/?p=1935","title":{"rendered":"Types of Numbers"},"content":{"rendered":"<p style=\"text-align: center;\"><a href=\".\/?page_id=1861\">Index<\/a><\/p>\n<p>Let&#8217;s check the specification of the numerical value and the type of the variable.<\/p>\n<p style=\"padding-left: 40px;\">&gt;&gt;&gt; x = 1<br \/>\n&gt;&gt;&gt; type (x)<br \/>\n&lt;class &#8216;int&#8217;&gt;<\/p>\n<p style=\"padding-left: 40px;\">&gt;&gt;&gt; y = 1.0<br \/>\n&gt;&gt;&gt; type (y)<br \/>\n&lt;class &#8216;float&#8217;&gt;<\/p>\n<p style=\"padding-left: 40px;\">&gt;&gt;&gt; z = 2<br \/>\n&gt;&gt;&gt; sum = x + y<br \/>\n&gt;&gt;&gt; type (sum)<br \/>\n&lt;class &#8216;float&#8217;&gt;<\/p>\n<p style=\"padding-left: 40px;\">&gt;&gt; dif = x &#8211; z<br \/>\n&gt;&gt;&gt; type (dif)<br \/>\n&lt;class &#8216;int&#8217;&gt;<\/p>\n<p style=\"padding-left: 40px;\">&gt;&gt; xx = 10<br \/>\n&gt;&gt;&gt; yy = 5<br \/>\n&gt;&gt;&gt; zz = xx * yy<br \/>\n&gt;&gt;&gt; type (zz)<br \/>\n&lt;class &#8216;int&#8217;&gt;<\/p>\n<p style=\"padding-left: 40px;\">&gt;&gt; dev = xx \/ yy<br \/>\n&gt;&gt;&gt; print (dev)<br \/>\n2.0<br \/>\n&gt;&gt;&gt; type (dev)<br \/>\n&lt;class &#8216;float&#8217;&gt;<\/p>\n<p><span style=\"color: #ff6600;\"><strong>Integer division produces a floating result.<\/strong><\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Index Let&#8217;s check the specificatio &hellip; <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[29],"tags":[],"class_list":["post-1935","post","type-post","status-publish","format-standard","hentry","category-python"],"_links":{"self":[{"href":"https:\/\/e-sys.ntsl.net\/index.php?rest_route=\/wp\/v2\/posts\/1935","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/e-sys.ntsl.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/e-sys.ntsl.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/e-sys.ntsl.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/e-sys.ntsl.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1935"}],"version-history":[{"count":2,"href":"https:\/\/e-sys.ntsl.net\/index.php?rest_route=\/wp\/v2\/posts\/1935\/revisions"}],"predecessor-version":[{"id":1938,"href":"https:\/\/e-sys.ntsl.net\/index.php?rest_route=\/wp\/v2\/posts\/1935\/revisions\/1938"}],"wp:attachment":[{"href":"https:\/\/e-sys.ntsl.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1935"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/e-sys.ntsl.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1935"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/e-sys.ntsl.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1935"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}