{"id":29287,"date":"2021-02-18T11:31:08","date_gmt":"2021-02-18T19:31:08","guid":{"rendered":"https:\/\/careerkarma.com\/blog\/?p=29287"},"modified":"2022-07-20T08:34:58","modified_gmt":"2022-07-20T15:34:58","slug":"python-sqrt","status":"publish","type":"post","link":"https:\/\/careerkarma.com\/blog\/python-sqrt\/","title":{"rendered":"Python sqrt(): A How-To Guide"},"content":{"rendered":"\n<p>Unless you\u2019re a math genius, you don\u2019t have all square roots memorized. And even if you did, someone else looking at your code may not know that you are. That means they might have to re-check that you wrote the correct square roots \u2014 that\u2019s just re-doing work.<br><\/p>\n\n\n\n<p>If you have used Python&#8217;s square root function, it is clear that a square root is being calculated. Another person looking at your code would <em>know<\/em> that it is accurate. As an added bonus, no one has to open their calculator!&nbsp;<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">What is Python sqrt()?<\/h2>\n\n\n\n<p>Whether you are using the Pythagorean theorem or working on a quadratic equation, Python\u2019s square root function \u2014 <em>sqrt() <\/em>\u2014 can help you solve your problems. As you may have guessed, <code>sqrt()<\/code> will return the square of the number you pass in as a parameter.<br><\/p>\n\n\n\n<p>The <code>sqrt()<\/code> method can be useful because it is fast and accurate. This brief tutorial covers what you can pass as a parameter to <code>sqrt()<\/code>, ways to get around invalid parameters, and an example to help you understand. You can get the square root of a number by raising it to a power of 0.5 using Python\u2019s exponent operator (**) or the <code>pow()<\/code> function.<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>81 ** 0.5  \/\/The result will be 9.0<\/pre><\/div>\n\n\n\n<p>When you work with multiple numbers requiring square roots, you will find that using the <code>sqrt()<\/code> function is more elegant than using multiple exponent operators with \u201c0.5\u201d. Also, it\u2019s more clear. It can be easy to forget or miss the extra asterisk (\u2018*\u2019), which will completely change the statement into a multiplication statement, giving you a completely different result.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Python Square Root Function Syntax<\/h2>\n\n\n\n<p>The general syntax used for calling the <code>sqrt()<\/code> function is:<br><\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>math.sqrt(x); <\/pre><\/div>\n\n\n\n<p>In the code snippet above, \u201cx\u201d is the number whose square root you want to calculate. The number you pass in as a parameter to the square root function can be greater than or equal to 0. Note that you can only pass in one number.&nbsp;<br><\/p>\n\n\n\n<p>But what does the \u201cmath\u201d part in the syntax above refer to? The math module is a Python library that holds many useful math-related functions, one of them being the <code>sqrt()<\/code> function. To use <code>sqrt()<\/code>, you will have to import the math module, as that\u2019s where the code to carry out the function is stored. By prefixing \u201cmath\u201d to <code>sqrt()<\/code>, the compiler knows you are using a function, <code>sqrt()<\/code>, belonging to the \u201cmath\u201d library.<br><\/p>\n\n\n\n<p>The way to import the math module is to write the keyword \u201cimport\u201d along with the name of the module \u2014 \u201cmath\u201d in this case. Your import statement is a simple line that you write before the code containing a <code>sqrt()<\/code> function:<br><\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>import math<\/pre><\/div>\n\n\n\n<p>The result of the square root function is a floating point number (float). For example, the result of using <code>sqrt()<\/code> on 81 would be 9.0, which is a floating point number.&nbsp;<br><\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>math.sqrt(81)  \n#9.0<\/pre><\/div>\n\n\n\n<p>Include the math import statement at the top of any file or terminal\/console session that contains code which uses <code>sqrt()<\/code>.<br><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">How to Use Python&#8217;s sqrt() Method<\/h2>\n\n\n\n<p>You can pass in positive float or int (integer) type positive numbers. We saw an int, 81, as a parameter in the previous example. But we can also pass in floats, 70.5, for example:<br><\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>math.sqrt(79.5)  \n#8.916277250063503<\/pre><\/div>\n\n\n\n<p>The result of that calculation is 8.916277250063503. As you can see, the result is pretty precise. Now you can see why it makes sense that the output will always be a double, even if the square root of a number is as simple as \u201c9\u201d.<br><\/p>\n\n\n\n<p>You can also pass in a variable that represents a number:<br><\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>yourValue= 90\nmath.sqrt(yourValue)\n# 9.486832980505138<\/pre><\/div>\n\n\n\n<p>And you can save the result in a variable as well:<br><\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>sqrtOfValue= math.sqrt(yourValue)<\/pre><\/div>\n\n\n\n<p>Saving this into a variable will make it easier to print to the screen:<br><\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>print(&quot;The square root is &quot; , sqrtOfValue)\n#The square root is:  9.486832980505138<\/pre><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Working with Negative Numbers with abs()<\/h2>\n\n\n\n<p>The square root of any number cannot be negative. This is because a square is the product of the number times itself, and if you multiply two negative numbers the negatives cancel out and the result will always be positive. If you attempt to pass a negative number to <code>sqrt()<\/code>, you will get an error message and your calculation will not go through.<br><\/p>\n\n\n\n<p>The <code>abs()<\/code> function returns the absolute value of a given number. The absolute value of -9 would be 9. Likewise, the absolute value of 9 is 9. Since <code>sqrt()<\/code> is designed to work with positive numbers, a negative number would throw a ValueError exception.<br><\/p>\n\n\n\n<p>Suppose you pass in variables to <code>sqrt()<\/code> and can\u2019t know if they are all positives without checking through long lines of code to find the variable values. At the same time, you also do not want a ValueError exception thrown at you. Even if you do look, some other programmer can come in and unintentionally add a negative variable, then your code will throw an error. To prevent this madness, you can use <code>abs()<\/code>:<br><\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>negativeValue= -9\nmath.sqrt(abs(negativeValue))  \n#3.0<\/pre><\/div>\n\n\n\n<p>Or , alternatively : <\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>math.sqrt(abs(-81))  \n# 9.0<\/pre><\/div>\n\n\n\n<p>The <code>abs()<\/code> function will take in your value and translate it to an absolute value (81 in this case). Then the non-negative, absolute value will be passed into the <code>sqrt()<\/code> function, which is what we want, so we do not get pesky errors!<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">List Comprehension and sqrt()<\/h2>\n\n\n\n<p>What if you have multiple numbers whose square roots you would like to obtain? You can calculate the square root for all in one line using an in-line for loop called a <a href=\"https:\/\/www.w3schools.com\/python\/python_lists_comprehension.asp\" target=\"_blank\" rel=\"noopener\" rel=\"nofollow\">list comprehension<\/a>.<br><\/p>\n\n\n\n<p>First make a list with the values whose square roots you want to obtain.<br><\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>numbers = [ 21, 30, 9.75, 55, 77]<\/pre><\/div>\n\n\n\n<p>Secondly, let\u2019s iterate through the list with a for-loop expression in order to get the square root for each value. The syntax for an in-line for-loop expression is for number in numbers, where \u201cnumber\u201d is each member of the list which we named \u201cnumbers\u201d. We will save the results in a list we will call \u201csquaredNumbers\u201d.<br><\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>squaredNumbers = [ math.sqrt(number) for number in numbers]<\/pre><\/div>\n\n\n\n<p>Use a <code>print()<\/code> statement to see the results of squaring the numbers list.&nbsp;<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>print(&quot;The square roots are: &quot; , squaredNumbers)\n# The square roots are: [4.58257569495584, 5.477225575051661, 3.122498999199199, \n# 7.416198487095663, 8.774964387392123]<\/pre><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">for-Statements and sqrt()<\/h2>\n\n\n\n<p>You can also use a typical for-loop. Although using a typical for-loop means you have to write more lines of code than the above example, for-loops can be easier to read for some people.&nbsp;<br><\/p>\n\n\n\n<p>First, declare the list you want to save the calculated values in.<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>squaredNumbers =[ ]<\/pre><\/div>\n\n\n\n<p>We will use the same values list (\u201cnumbers\u201d) as in the previous example, and iterate through each of its elements, which we named \u201cnumber\u201d.<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>for number in numbers:\n\tsquaredNumbers.append(math.sqrt(number))<\/pre><\/div>\n\n\n\n<p>Now if you print this new list of squared numbers, you get the same output as the earlier example.<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>print(&quot;The square roots are: &quot; , squaredNumbers)\n# The square roots are: [4.58257569495584, 5.477225575051661, 3.122498999199199, 7.416198487095663, 8.774964387392123]<\/pre><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Example with sqrt(): Diagonal Distances<\/h2>\n\n\n\n<p>There are many usages for <code>sqrt()<\/code>. One example is you can use it to find the diagonal distance between two points that cross at right angles, such as street corners or points on a field or blueprint schematic.<br><\/p>\n\n\n\n<p>This is because the diagonal distance between two points that cross at a right angle would be equivalent to the hypotenuse of a triangle, and for that you could use the pythagorean theorem, (a<sup>2<\/sup> + b<sup>2<\/sup>) = c<sup>2 <\/sup>, which happens to use square roots. This formula is very handy because in city streets, home blueprints, and fields, it can be easy to get length and width measurements but not for the diagonals between them.<br><\/p>\n\n\n\n<p>You would have to use <code>sqrt()<\/code> on the hypotenuse, c<sup>2 <\/sup>, to have the length. Another way we could rewrite the pythagorean theorem is c= \u221aa<sup>2<\/sup> + b<sup>2<\/sup>. Let\u2019s imagine we ran a circuit at our local park in the form of a triangle.<br><\/p>\n\n\n\n<p>We ran lengthwise and widthwise, then cut across back to our starting point. To get an accurate count of how many feet you ran, you could calculate the feet of the diagonal way you cut across by using the length and width (whose length in feet you could save as the variables \u201ca\u201d and \u201cb\u201d) of the park:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>import math\na=27\nb=39\nmath.sqrt(a**2+ b**2)<\/pre><\/div>\n\n\n\n<p>The result would be 47.43416490252569. So when you add this to the other two lengths, you know and there you have it. The total number of feet you ran in your right-triangle shaped path at the park.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">What Else Can You Do with Sqrt()?<\/h2>\n\n\n\n<p>Now that you know the basics, the possibilities are endless. For instance:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Use it in a <a href=\"https:\/\/inventwithpython.com\/hacking\/chapter23.html#:~:text=A%20prime%20number%20has%20no,the%20number%20it%20is%20passed.\" target=\"_blank\" rel=\"noopener\" rel=\"nofollow\">formula<\/a> to determine prime numbers.<\/li><li>Perform any number of operations requiring a precise square root.<\/li><li>Use it to calculate distances.<\/li><\/ul>\n\n\n\n<p>In this article, you\u2019ve learned how to use <code>sqrt()<\/code> with positive and negative numbers, lists, and how to rework the pythagorean theorem so that four math calculations are done with <code>sqrt()<\/code>.&nbsp;<br><\/p>\n\n\n\n<p>Do you need to work with whole numbers instead of floating point numbers? <code>math.isqrt()<\/code> outputs the square as an integer and rounds down to the nearest whole. You can even use <code>sqrt()<\/code> with libraries other than the \u201cmath\u201d library such as <a href=\"https:\/\/www.w3schools.com\/python\/numpy_intro.asp\" target=\"_blank\" rel=\"noopener\" rel=\"nofollow\">numPy<\/a>, a python library used for working with arrays.<\/p>\n","protected":false},"excerpt":{"rendered":"Unless you\u2019re a math genius, you don\u2019t have all square roots memorized. And even if you did, someone else looking at your code may not know that you are. That means they might have to re-check that you wrote the correct square roots \u2014 that\u2019s just re-doing work. If you have used Python's square root&hellip;","protected":false},"author":114,"featured_media":12064,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[16578],"tags":[],"class_list":{"0":"post-29287","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-python"},"acf":{"post_sub_title":"","sprint_id":"","query_class":"Python","school_sft":"","parent_sft":"","school_privacy_policy":"","has_review":null,"is_sponser_post":"","is_guest_post":""},"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.0 (Yoast SEO v27.0) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Python sqrt: A How-To Guide<\/title>\n<meta name=\"description\" content=\"A brief overview of Python sqrt -- how to use the function, what parameters are valid, and examples using it.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/careerkarma.com\/blog\/python-sqrt\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Python sqrt(): A How-To Guide\" \/>\n<meta property=\"og:description\" content=\"A brief overview of Python sqrt -- how to use the function, what parameters are valid, and examples using it.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/careerkarma.com\/blog\/python-sqrt\/\" \/>\n<meta property=\"og:site_name\" content=\"Career Karma\" \/>\n<meta property=\"article:publisher\" content=\"http:\/\/facebook.com\/careerkarmaapp\" \/>\n<meta property=\"article:published_time\" content=\"2021-02-18T19:31:08+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-07-20T15:34:58+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/02\/PYTHON.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1000\" \/>\n\t<meta property=\"og:image:height\" content=\"668\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Yessenia Mata\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@career_karma\" \/>\n<meta name=\"twitter:site\" content=\"@career_karma\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Yessenia Mata\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"8 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/careerkarma.com\/blog\/python-sqrt\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/python-sqrt\/\"},\"author\":{\"name\":\"Yessenia Mata\",\"@id\":\"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/616533dc6ff37b9111aad55631595ec3\"},\"headline\":\"Python sqrt(): A How-To Guide\",\"datePublished\":\"2021-02-18T19:31:08+00:00\",\"dateModified\":\"2022-07-20T15:34:58+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/python-sqrt\/\"},\"wordCount\":1409,\"commentCount\":0,\"image\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/python-sqrt\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/02\/PYTHON.jpg\",\"articleSection\":[\"Python\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/careerkarma.com\/blog\/python-sqrt\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/careerkarma.com\/blog\/python-sqrt\/\",\"url\":\"https:\/\/careerkarma.com\/blog\/python-sqrt\/\",\"name\":\"Python sqrt: A How-To Guide\",\"isPartOf\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/python-sqrt\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/python-sqrt\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/02\/PYTHON.jpg\",\"datePublished\":\"2021-02-18T19:31:08+00:00\",\"dateModified\":\"2022-07-20T15:34:58+00:00\",\"author\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/616533dc6ff37b9111aad55631595ec3\"},\"description\":\"A brief overview of Python sqrt -- how to use the function, what parameters are valid, and examples using it.\",\"breadcrumb\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/python-sqrt\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/careerkarma.com\/blog\/python-sqrt\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/careerkarma.com\/blog\/python-sqrt\/#primaryimage\",\"url\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/02\/PYTHON.jpg\",\"contentUrl\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/02\/PYTHON.jpg\",\"width\":1000,\"height\":668},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/careerkarma.com\/blog\/python-sqrt\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Blog\",\"item\":\"https:\/\/careerkarma.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Python\",\"item\":\"https:\/\/careerkarma.com\/blog\/python\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Python sqrt(): A How-To Guide\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/careerkarma.com\/blog\/#website\",\"url\":\"https:\/\/careerkarma.com\/blog\/\",\"name\":\"Career Karma\",\"description\":\"Latest Coding Bootcamp News &amp; Career Hacks from Industry Insiders\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/careerkarma.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/616533dc6ff37b9111aad55631595ec3\",\"name\":\"Yessenia Mata\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2021\/02\/TD8SYPRGU-U01LTPHLWG2-ef37ec165b60-512-150x150.jpg\",\"contentUrl\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2021\/02\/TD8SYPRGU-U01LTPHLWG2-ef37ec165b60-512-150x150.jpg\",\"caption\":\"Yessenia Mata\"},\"description\":\"Yessenia is a technical writer at Career Karma. In addition to contributing to Career Karma as a writer, Yessenia currently works in IT in the San Francisco Bay Area. She has experience with programming languages including Java, Python, HTML, CSS, and JavaScript and is double majoring in CNIT and Computer Science.\",\"url\":\"https:\/\/careerkarma.com\/blog\/author\/yessenia-m\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Python sqrt: A How-To Guide","description":"A brief overview of Python sqrt -- how to use the function, what parameters are valid, and examples using it.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/careerkarma.com\/blog\/python-sqrt\/","og_locale":"en_US","og_type":"article","og_title":"Python sqrt(): A How-To Guide","og_description":"A brief overview of Python sqrt -- how to use the function, what parameters are valid, and examples using it.","og_url":"https:\/\/careerkarma.com\/blog\/python-sqrt\/","og_site_name":"Career Karma","article_publisher":"http:\/\/facebook.com\/careerkarmaapp","article_published_time":"2021-02-18T19:31:08+00:00","article_modified_time":"2022-07-20T15:34:58+00:00","og_image":[{"width":1000,"height":668,"url":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/02\/PYTHON.jpg","type":"image\/jpeg"}],"author":"Yessenia Mata","twitter_card":"summary_large_image","twitter_creator":"@career_karma","twitter_site":"@career_karma","twitter_misc":{"Written by":"Yessenia Mata","Est. reading time":"8 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/careerkarma.com\/blog\/python-sqrt\/#article","isPartOf":{"@id":"https:\/\/careerkarma.com\/blog\/python-sqrt\/"},"author":{"name":"Yessenia Mata","@id":"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/616533dc6ff37b9111aad55631595ec3"},"headline":"Python sqrt(): A How-To Guide","datePublished":"2021-02-18T19:31:08+00:00","dateModified":"2022-07-20T15:34:58+00:00","mainEntityOfPage":{"@id":"https:\/\/careerkarma.com\/blog\/python-sqrt\/"},"wordCount":1409,"commentCount":0,"image":{"@id":"https:\/\/careerkarma.com\/blog\/python-sqrt\/#primaryimage"},"thumbnailUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/02\/PYTHON.jpg","articleSection":["Python"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/careerkarma.com\/blog\/python-sqrt\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/careerkarma.com\/blog\/python-sqrt\/","url":"https:\/\/careerkarma.com\/blog\/python-sqrt\/","name":"Python sqrt: A How-To Guide","isPartOf":{"@id":"https:\/\/careerkarma.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/careerkarma.com\/blog\/python-sqrt\/#primaryimage"},"image":{"@id":"https:\/\/careerkarma.com\/blog\/python-sqrt\/#primaryimage"},"thumbnailUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/02\/PYTHON.jpg","datePublished":"2021-02-18T19:31:08+00:00","dateModified":"2022-07-20T15:34:58+00:00","author":{"@id":"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/616533dc6ff37b9111aad55631595ec3"},"description":"A brief overview of Python sqrt -- how to use the function, what parameters are valid, and examples using it.","breadcrumb":{"@id":"https:\/\/careerkarma.com\/blog\/python-sqrt\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/careerkarma.com\/blog\/python-sqrt\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/careerkarma.com\/blog\/python-sqrt\/#primaryimage","url":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/02\/PYTHON.jpg","contentUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/02\/PYTHON.jpg","width":1000,"height":668},{"@type":"BreadcrumbList","@id":"https:\/\/careerkarma.com\/blog\/python-sqrt\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Blog","item":"https:\/\/careerkarma.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Python","item":"https:\/\/careerkarma.com\/blog\/python\/"},{"@type":"ListItem","position":3,"name":"Python sqrt(): A How-To Guide"}]},{"@type":"WebSite","@id":"https:\/\/careerkarma.com\/blog\/#website","url":"https:\/\/careerkarma.com\/blog\/","name":"Career Karma","description":"Latest Coding Bootcamp News &amp; Career Hacks from Industry Insiders","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/careerkarma.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/616533dc6ff37b9111aad55631595ec3","name":"Yessenia Mata","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2021\/02\/TD8SYPRGU-U01LTPHLWG2-ef37ec165b60-512-150x150.jpg","contentUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2021\/02\/TD8SYPRGU-U01LTPHLWG2-ef37ec165b60-512-150x150.jpg","caption":"Yessenia Mata"},"description":"Yessenia is a technical writer at Career Karma. In addition to contributing to Career Karma as a writer, Yessenia currently works in IT in the San Francisco Bay Area. She has experience with programming languages including Java, Python, HTML, CSS, and JavaScript and is double majoring in CNIT and Computer Science.","url":"https:\/\/careerkarma.com\/blog\/author\/yessenia-m\/"}]}},"_links":{"self":[{"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/posts\/29287","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/users\/114"}],"replies":[{"embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/comments?post=29287"}],"version-history":[{"count":0,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/posts\/29287\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/media\/12064"}],"wp:attachment":[{"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/media?parent=29287"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/categories?post=29287"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/tags?post=29287"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}