{"id":17719,"date":"2020-06-01T06:49:41","date_gmt":"2020-06-01T13:49:41","guid":{"rendered":"https:\/\/careerkarma.com\/blog\/?p=17719"},"modified":"2023-12-01T03:05:41","modified_gmt":"2023-12-01T11:05:41","slug":"python-math-operators","status":"publish","type":"post","link":"https:\/\/careerkarma.com\/blog\/python-math-operators\/","title":{"rendered":"Python Math Operators: A Guide"},"content":{"rendered":"\n<p>No matter what you\u2019re building, it\u2019s likely that numbers will come up somewhere in your code. You may use numbers to store the prices of items on a menu for a restaurant app or to perform conversions between different currencies in a currency exchange app.<br><\/p>\n\n\n\n<p>Beginners to Python commonly ask how to perform mathematical operations on numbers in their code. This tutorial will answer that question. We will help you navigate the basics of mathematical operators in Python. By the end of reading this tutorial, you\u2019ll be expert at using Python\u2019s built-in math operators.<br><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">What Is an Operator?<\/h2>\n\n\n\n<p>Before we discuss how to use Python\u2019s math operators, we need to take a step back and talk about operators.<br><\/p>\n\n\n\n<p>An operator is a special symbol that performs a specific action in a program. For instance, the minus sign (-) is an operator. It is used to perform a subtraction operation.<br><\/p>\n\n\n\n<p>Operators come in all flavors, but for this tutorial we will focus on the Python math operators. You may also hear these referred to as \u201carithmetic operators.\u201d<br><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Addition and Subtraction<\/h2>\n\n\n\n<p>Now that we know the basics of operators, let\u2019s delve into how to use Python\u2019s math operators, starting with addition and subtraction.<br><\/p>\n\n\n\n<p>The plus sign (+) allows you to perform addition in a program. The minus sign (-) allows you to perform subtraction. Let\u2019s explore a few examples of these symbols in a program.<br><\/p>\n\n\n\n<p>Suppose we want to add 5 and 10 together. We could do so using this code:<br><\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>print(5 + 10)\n<\/pre><\/div>\n\n\n\n<p>Our code returns: 15.<br><\/p>\n\n\n\n<p>Python developers often use variables in math equations. This can improve readability, because you can assign a label to each variable which will help you keep track of the purpose of the values with which you are working. For example, to subtract 19 from 27, we could use this code:<br><\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>a = 27\nb = 19\nprint(a - b)\n<\/pre><\/div>\n\n\n\n<p>Our code returns: 8.<br><\/p>\n\n\n\n<p>In our code, \u201ca\u201d and \u201cb\u201d are variables. We set the value of \u201ca\u201d to 27 and the value of \u201cb\u201d to 19. Then, we subtracted \u201cb\u201d from \u201ca\u201d.<br><\/p>\n\n\n\n<p>When working with Python\u2019s math operators, we can use both positive and negative numbers (Assuming, of course, the numbers we use can yield a mathematically-accurate return. If you try to divide a number by 0, for instance, an error will be returned.) For example, we could add a positive number to a negative number, like so:<br><\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>a = 8\nb = -9\nprint(a + b)\n<\/pre><\/div>\n\n\n\n<p>Our code returns: -1.<br><\/p>\n\n\n\n<p>So far, we\u2019ve been working with integers. But we can also use floating-point numbers (decimal numbers) in mathematical operations in Python. If we specify a decimal number in a mathematical operation, the program will return a decimal number.<br><\/p>\n\n\n\n<p>Suppose we want to add 8.2 to 4. We could do so using this code:<br><\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>print(8.2 + 4)\n<\/pre><\/div>\n\n\n\n<p>Our code returns: 12.2.&nbsp;<br><\/p>\n\n\n\n<p>As you can see, our program returned the sum of our two numbers, represented as a decimal number.<br><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Multiplication and Division<\/h2>\n\n\n\n<p>The single asterisk sign (*) is used to multiply numbers in Python, and the single forward slash sign (\/) is used to divide numbers in Python.<br><\/p>\n\n\n\n<p>Let\u2019s say we want to multiply 92 by 8. We could do so using this code:<br><\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>a = 92\nb = 8\nprint(a * b)\n<\/pre><\/div>\n\n\n\n<p>Our code returns: 736.&nbsp;<br><\/p>\n\n\n\n<p>As you can see, we used the * operator to multiply our numbers.<br><\/p>\n\n\n\n<p>Similarly, let\u2019s say we want to divide two floating-point numbers. We could do so using this Python 3 code:<br><\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>a = 18.2\nb = 2\nprint(a \/ b)\n<\/pre><\/div>\n\n\n\n<p>Our code returns: 9.1.&nbsp;<br><\/p>\n\n\n\n<p>In this code, we used the forward slash to indicate we wanted to divide our numbers.<br><\/p>\n\n\n\n<p>It\u2019s worth noting that when you\u2019re dividing numbers using the forward slash in Python 3, the final result will always be an unrounded float (floating-point number). However, if you are dividing a number in Python 2 using the forward slash, the final result will be an integer.<br><\/p>\n\n\n\n<p>So, when we run our above code in Python 2, the program returns: 9.<br><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Modulo Operator<\/h2>\n\n\n\n<p>The percentage sign (%) functions as the Python modulo operator. This operator returns the mathematical remainder, rather than the final result, of a division operation.<br><\/p>\n\n\n\n<p>Suppose we want to find the remainder of 20 divided by 6. We could do so using this code:<br><\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>a = 20\nb = 6\nprint(a % b)\n<\/pre><\/div>\n\n\n\n<p>Our code returns: 2.&nbsp;<br><\/p>\n\n\n\n<p>20 can be divided by 6 three times, and the remainder is 2. Therefore, the program returns the value 2.<br><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Power Operator<\/h2>\n\n\n\n<p>Two asterisks (**) make up the Python power operator. The power operator allows you to raise one number to the power of another number. In other words, the power operator allows you to multiply a number by itself a certain number of times.<br><\/p>\n\n\n\n<p>So, suppose we wanted to calculate 5 to the power of 3\u2014in other words, to multiply 5 by itself 3 times (5 x 5 x 5). We could do so using this code:<br><\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>a = 5\nb = 3\nprint(a ** b)\n<\/pre><\/div>\n\n\n\n<p>Our code returns: 125.&nbsp;<br><\/p>\n\n\n\n<p>The power operator tells our program to raise the value of \u201ca\u201d to the exponent of the value of \u201cb\u201d. Thus, using the values we assigned, the program computed 5 to the value of 3 and returned the value 125.&nbsp;<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Order of Operations (Operator Precedence)<\/h2>\n\n\n\n<p>In mathematics, problems are solved via a specific order of operations. Predetermined rules dictate the order in which you perform calculations containing multiple operations.&nbsp;<br><\/p>\n\n\n\n<p>The same is true in Python. In fact, Python follows the standard order of operations used in mathematics.<br><\/p>\n\n\n\n<p>Consider the following programming statement:<br><\/p>\n\n\n\n<p><code>problem = 10 + 15 \/ 2<br><\/code><\/p>\n\n\n\n<p>The answer to this problem, if read left to right and without regard for the standard order of operations, is 12.5. However, this is not the correct answer.&nbsp;<br><\/p>\n\n\n\n<p>When you\u2019re doing math problems, you must complete division operations before you complete addition operations. So, 15 should be divided by 2 first. Then, the result of that is added to 10. The correct answer is 17.5<br><\/p>\n\n\n\n<p>Likewise, if we run this problem in Python, the program returns: 17.5.<br><\/p>\n\n\n\n<p>The order of operations in math is as follows:<br><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>B<\/strong>rackets<\/li>\n\n\n\n<li><strong>O<\/strong>rder (power \/ square roots)<\/li>\n\n\n\n<li><strong>D<\/strong>ivision<\/li>\n\n\n\n<li><strong>M<\/strong>ultiplication<\/li>\n\n\n\n<li><strong>A<\/strong>ddition<\/li>\n\n\n\n<li><strong>S<\/strong>ubtraction<\/li>\n<\/ul>\n\n\n\n<p>This makes up the acronym BODMAS. When Python is working through a math problem, it will use this order.<br><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Python Operator Reference Table<\/h2>\n\n\n\n<p>In this tutorial, we explored the main Python operators. Here is a reference table of what we covered:<br><\/p>\n\n\n\n<figure class=\"wp-block-table course-info-table\"><table><tbody><tr><td><strong>Operator<\/strong><\/td><td><strong>Description<\/strong><\/td><\/tr><tr><td>+<\/td><td>Adds two numbers.<\/td><\/tr><tr><td>&#8211;<\/td><td>Subtracts the right number from the left number.<\/td><\/tr><tr><td>*<\/td><td>Multiplies two numbers.<\/td><\/tr><tr><td>\/<\/td><td>Divides the left number by the right number.<\/td><\/tr><tr><td>%<\/td><td>Calculates the remainder of a division sum.<\/td><\/tr><tr><td>**<\/td><td>Raises the left number to the power of the right.<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Conclusion<\/h2>\n\n\n\n<p>Python offers a wide range of mathematical operators that allow you to work with numbers in your code.<br><\/p>\n\n\n\n<p>In this tutorial, we discussed how to use the addition, subtraction, multiplication, division, modulo, and power operators. We also discussed the order of operations Python follows when solving math problems. Now you\u2019re ready to start using Python\u2019s math operators like an expert!<\/p>\n\n\n\n<p><br><strong><em>Are you looking for a Python training program? Download the <\/em><\/strong><a href=\"https:\/\/careerkarma.com\/\"><strong><em>free Career Karma app<\/em><\/strong><\/a><strong><em> today to talk with a career coach about how you can get the training you need to pursue a career as a Python developer.<\/em><\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"No matter what you\u2019re building, it\u2019s likely that numbers will come up somewhere in your code. You may use numbers to store the prices of items on a menu for a restaurant app or to perform conversions between different currencies in a currency exchange app. Beginners to Python commonly ask how to perform mathematical operations&hellip;","protected":false},"author":240,"featured_media":17721,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[16578],"tags":[],"class_list":{"0":"post-17719","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":"","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 Math Operators: A Guide | Career Karma<\/title>\n<meta name=\"description\" content=\"Python math operators allow you to perform mathematical operations such as addition, subtraction, multiplication, and division. On Career Karma, learn how to use Python\u2019s math operators.\" \/>\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-math-operators\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Python Math Operators: A Guide\" \/>\n<meta property=\"og:description\" content=\"Python math operators allow you to perform mathematical operations such as addition, subtraction, multiplication, and division. On Career Karma, learn how to use Python\u2019s math operators.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/careerkarma.com\/blog\/python-math-operators\/\" \/>\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=\"2020-06-01T13:49:41+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-12-01T11:05:41+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/06\/person-touching-gray-laptop-computer-1181305.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=\"James Gallagher\" \/>\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=\"James Gallagher\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/careerkarma.com\/blog\/python-math-operators\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/python-math-operators\/\"},\"author\":{\"name\":\"James Gallagher\",\"@id\":\"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94\"},\"headline\":\"Python Math Operators: A Guide\",\"datePublished\":\"2020-06-01T13:49:41+00:00\",\"dateModified\":\"2023-12-01T11:05:41+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/python-math-operators\/\"},\"wordCount\":1134,\"commentCount\":0,\"image\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/python-math-operators\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/06\/person-touching-gray-laptop-computer-1181305.jpg\",\"articleSection\":[\"Python\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/careerkarma.com\/blog\/python-math-operators\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/careerkarma.com\/blog\/python-math-operators\/\",\"url\":\"https:\/\/careerkarma.com\/blog\/python-math-operators\/\",\"name\":\"Python Math Operators: A Guide | Career Karma\",\"isPartOf\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/python-math-operators\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/python-math-operators\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/06\/person-touching-gray-laptop-computer-1181305.jpg\",\"datePublished\":\"2020-06-01T13:49:41+00:00\",\"dateModified\":\"2023-12-01T11:05:41+00:00\",\"author\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94\"},\"description\":\"Python math operators allow you to perform mathematical operations such as addition, subtraction, multiplication, and division. On Career Karma, learn how to use Python\u2019s math operators.\",\"breadcrumb\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/python-math-operators\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/careerkarma.com\/blog\/python-math-operators\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/careerkarma.com\/blog\/python-math-operators\/#primaryimage\",\"url\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/06\/person-touching-gray-laptop-computer-1181305.jpg\",\"contentUrl\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/06\/person-touching-gray-laptop-computer-1181305.jpg\",\"width\":1000,\"height\":668},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/careerkarma.com\/blog\/python-math-operators\/#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 Math Operators: A 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\/e79364792443fbff794a144c67ec8e94\",\"name\":\"James Gallagher\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/01\/james-gallagher-150x150.jpg\",\"contentUrl\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/01\/james-gallagher-150x150.jpg\",\"caption\":\"James Gallagher\"},\"description\":\"James Gallagher is a self-taught programmer and the technical content manager at Career Karma. He has experience in range of programming languages and extensive expertise in Python, HTML, CSS, and JavaScript. James has written hundreds of programming tutorials, and he frequently contributes to publications like Codecademy, Treehouse, Repl.it, Afrotech, and others.\",\"url\":\"https:\/\/careerkarma.com\/blog\/author\/jamesgallagher\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Python Math Operators: A Guide | Career Karma","description":"Python math operators allow you to perform mathematical operations such as addition, subtraction, multiplication, and division. On Career Karma, learn how to use Python\u2019s math operators.","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-math-operators\/","og_locale":"en_US","og_type":"article","og_title":"Python Math Operators: A Guide","og_description":"Python math operators allow you to perform mathematical operations such as addition, subtraction, multiplication, and division. On Career Karma, learn how to use Python\u2019s math operators.","og_url":"https:\/\/careerkarma.com\/blog\/python-math-operators\/","og_site_name":"Career Karma","article_publisher":"http:\/\/facebook.com\/careerkarmaapp","article_published_time":"2020-06-01T13:49:41+00:00","article_modified_time":"2023-12-01T11:05:41+00:00","og_image":[{"width":1000,"height":668,"url":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/06\/person-touching-gray-laptop-computer-1181305.jpg","type":"image\/jpeg"}],"author":"James Gallagher","twitter_card":"summary_large_image","twitter_creator":"@career_karma","twitter_site":"@career_karma","twitter_misc":{"Written by":"James Gallagher","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/careerkarma.com\/blog\/python-math-operators\/#article","isPartOf":{"@id":"https:\/\/careerkarma.com\/blog\/python-math-operators\/"},"author":{"name":"James Gallagher","@id":"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94"},"headline":"Python Math Operators: A Guide","datePublished":"2020-06-01T13:49:41+00:00","dateModified":"2023-12-01T11:05:41+00:00","mainEntityOfPage":{"@id":"https:\/\/careerkarma.com\/blog\/python-math-operators\/"},"wordCount":1134,"commentCount":0,"image":{"@id":"https:\/\/careerkarma.com\/blog\/python-math-operators\/#primaryimage"},"thumbnailUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/06\/person-touching-gray-laptop-computer-1181305.jpg","articleSection":["Python"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/careerkarma.com\/blog\/python-math-operators\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/careerkarma.com\/blog\/python-math-operators\/","url":"https:\/\/careerkarma.com\/blog\/python-math-operators\/","name":"Python Math Operators: A Guide | Career Karma","isPartOf":{"@id":"https:\/\/careerkarma.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/careerkarma.com\/blog\/python-math-operators\/#primaryimage"},"image":{"@id":"https:\/\/careerkarma.com\/blog\/python-math-operators\/#primaryimage"},"thumbnailUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/06\/person-touching-gray-laptop-computer-1181305.jpg","datePublished":"2020-06-01T13:49:41+00:00","dateModified":"2023-12-01T11:05:41+00:00","author":{"@id":"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94"},"description":"Python math operators allow you to perform mathematical operations such as addition, subtraction, multiplication, and division. On Career Karma, learn how to use Python\u2019s math operators.","breadcrumb":{"@id":"https:\/\/careerkarma.com\/blog\/python-math-operators\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/careerkarma.com\/blog\/python-math-operators\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/careerkarma.com\/blog\/python-math-operators\/#primaryimage","url":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/06\/person-touching-gray-laptop-computer-1181305.jpg","contentUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/06\/person-touching-gray-laptop-computer-1181305.jpg","width":1000,"height":668},{"@type":"BreadcrumbList","@id":"https:\/\/careerkarma.com\/blog\/python-math-operators\/#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 Math Operators: A 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\/e79364792443fbff794a144c67ec8e94","name":"James Gallagher","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/01\/james-gallagher-150x150.jpg","contentUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/01\/james-gallagher-150x150.jpg","caption":"James Gallagher"},"description":"James Gallagher is a self-taught programmer and the technical content manager at Career Karma. He has experience in range of programming languages and extensive expertise in Python, HTML, CSS, and JavaScript. James has written hundreds of programming tutorials, and he frequently contributes to publications like Codecademy, Treehouse, Repl.it, Afrotech, and others.","url":"https:\/\/careerkarma.com\/blog\/author\/jamesgallagher\/"}]}},"_links":{"self":[{"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/posts\/17719","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\/240"}],"replies":[{"embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/comments?post=17719"}],"version-history":[{"count":0,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/posts\/17719\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/media\/17721"}],"wp:attachment":[{"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/media?parent=17719"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/categories?post=17719"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/tags?post=17719"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}