{"id":3932,"date":"2022-12-05T08:37:28","date_gmt":"2022-12-05T08:37:28","guid":{"rendered":"https:\/\/gyanipandit.com\/programming\/?p=3932"},"modified":"2022-12-05T08:37:30","modified_gmt":"2022-12-05T08:37:30","slug":"python-math-floor","status":"publish","type":"post","link":"https:\/\/gyanipandit.com\/programming\/python-math-floor\/","title":{"rendered":"Python Math Floor Method"},"content":{"rendered":"<p style=\"text-align: center;\">Python Math Floor<\/p>\n<p>Now, we are going to learn about the floor method. As the name of the method suggests, with the floor method, we are going to get the greatest integer less than or equal to x. so, the floor method takes in an argument, which is a number, and it returns the floor of the number.<\/p>\n<p>Let\u2019s have a look at a simple program, which demonstrates the same thing &#8211;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-3933 size-full\" src=\"https:\/\/gyanipandit.com\/programming\/wp-content\/uploads\/2022\/11\/THE-floor-METHOD.jpg\" alt=\"\" width=\"640\" height=\"71\" srcset=\"https:\/\/gyanipandit.com\/programming\/wp-content\/uploads\/2022\/11\/THE-floor-METHOD.jpg 640w, https:\/\/gyanipandit.com\/programming\/wp-content\/uploads\/2022\/11\/THE-floor-METHOD-300x33.jpg 300w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/p>\n<h2 style=\"text-align: center;\">Python Math Floor<\/h2>\n<p>As you can see in the above program, we have imported the math module, and then we are calling the floor method. We are passing the argument as 5.7 to the floor method. The floor method returns the greatest integer less than or equal to the given argument. So, if we try to execute the above program, we get the output as 5, which is the greatest integer, less than or equal to 5.7. We have directly printed the output, but you can also store it for future access in the program.<\/p>\n<p>So, as and when required, we can make use of the floor method in our python programs. Remember that the floor method returns the greatest number less than or equal to the given argument.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Python Math Floor Now, we are going to learn about the floor method. As the name of the method suggests, with the floor method, we are going to get the greatest integer less than or equal to x. so, the floor method takes in an argument, which is a number, and it returns the floor [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[25],"tags":[26,27],"class_list":{"0":"post-3932","1":"post","2":"type-post","3":"status-publish","4":"format-standard","6":"category-python-tutorial","7":"tag-python","8":"tag-python-tutorial"},"_links":{"self":[{"href":"https:\/\/gyanipandit.com\/programming\/wp-json\/wp\/v2\/posts\/3932","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/gyanipandit.com\/programming\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/gyanipandit.com\/programming\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/gyanipandit.com\/programming\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/gyanipandit.com\/programming\/wp-json\/wp\/v2\/comments?post=3932"}],"version-history":[{"count":2,"href":"https:\/\/gyanipandit.com\/programming\/wp-json\/wp\/v2\/posts\/3932\/revisions"}],"predecessor-version":[{"id":4251,"href":"https:\/\/gyanipandit.com\/programming\/wp-json\/wp\/v2\/posts\/3932\/revisions\/4251"}],"wp:attachment":[{"href":"https:\/\/gyanipandit.com\/programming\/wp-json\/wp\/v2\/media?parent=3932"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/gyanipandit.com\/programming\/wp-json\/wp\/v2\/categories?post=3932"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/gyanipandit.com\/programming\/wp-json\/wp\/v2\/tags?post=3932"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}