{"id":3926,"date":"2022-12-05T08:28:28","date_gmt":"2022-12-05T08:28:28","guid":{"rendered":"https:\/\/gyanipandit.com\/programming\/?p=3926"},"modified":"2022-12-05T08:28:29","modified_gmt":"2022-12-05T08:28:29","slug":"python-math-ceil","status":"publish","type":"post","link":"https:\/\/gyanipandit.com\/programming\/python-math-ceil\/","title":{"rendered":"Python Math Ceil Method"},"content":{"rendered":"<p style=\"text-align: center;\">Python Math Ceil<\/p>\n<p>Now, we are going to learn about the ceil method. As the name of the method says, this method returns the ceiling of the given argument number. This simply means that we are going to get the smallest integer, greater than or equal to the given number argument.<\/p>\n<p>Let\u2019s have a look at a simple example, which tries to demonstrate the same thing.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-3927 size-full\" src=\"https:\/\/gyanipandit.com\/programming\/wp-content\/uploads\/2022\/11\/THE-ceil-METHOD.jpg\" alt=\"\" width=\"624\" height=\"73\" srcset=\"https:\/\/gyanipandit.com\/programming\/wp-content\/uploads\/2022\/11\/THE-ceil-METHOD.jpg 624w, https:\/\/gyanipandit.com\/programming\/wp-content\/uploads\/2022\/11\/THE-ceil-METHOD-300x35.jpg 300w\" sizes=\"auto, (max-width: 624px) 100vw, 624px\" \/><\/p>\n<h2 style=\"text-align: center;\">Python Math Ceil<\/h2>\n<p>As you can see in the above program, we have imported the math class, since it is a module, we need to import it, in order to use it in our programs. Also, with the import statement from the above program, we can understand how we can write the import statement, to import some modules into our program.<\/p>\n<p>After that, we are calling the ceil method, and notice how we are calling the ceil method. We are just doing math.ceil, and then passing the argument number. We get the smallest integer, greater than or equal to the given number.\u00a0\u00a0 If you try to run the above program, it would print 11 as the output, since 11 is the smallest integer greater than or equal to 10.2.<\/p>\n<p>So, as and when required, we can make use of the ceil method from the math module. Remember that the ceil method returns the smallest integer greater than or equal to the given argument number.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Python Math Ceil Now, we are going to learn about the ceil method. As the name of the method says, this method returns the ceiling of the given argument number. This simply means that we are going to get the smallest integer, greater than or equal to the given number argument. Let\u2019s have a look [&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-3926","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\/3926","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=3926"}],"version-history":[{"count":2,"href":"https:\/\/gyanipandit.com\/programming\/wp-json\/wp\/v2\/posts\/3926\/revisions"}],"predecessor-version":[{"id":4249,"href":"https:\/\/gyanipandit.com\/programming\/wp-json\/wp\/v2\/posts\/3926\/revisions\/4249"}],"wp:attachment":[{"href":"https:\/\/gyanipandit.com\/programming\/wp-json\/wp\/v2\/media?parent=3926"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/gyanipandit.com\/programming\/wp-json\/wp\/v2\/categories?post=3926"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/gyanipandit.com\/programming\/wp-json\/wp\/v2\/tags?post=3926"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}