{"id":21911,"date":"2020-08-31T10:28:46","date_gmt":"2020-08-31T17:28:46","guid":{"rendered":"https:\/\/careerkarma.com\/blog\/?p=21911"},"modified":"2023-12-01T03:58:56","modified_gmt":"2023-12-01T11:58:56","slug":"python-typeerror-float-object-cannot-be-interpreted-as-an-integer","status":"publish","type":"post","link":"https:\/\/careerkarma.com\/blog\/python-typeerror-float-object-cannot-be-interpreted-as-an-integer\/","title":{"rendered":"Python TypeError: \u2018float\u2019 object cannot be interpreted as an integer Solution"},"content":{"rendered":"\n<p>Python has two data types that represent numbers: floats and integers. These data types have distinct properties.<br><\/p>\n\n\n\n<p>If you try to use a float with a function that only supports integers, like the <code>range()<\/code> function, you\u2019ll encounter the \u201cTypeError: \u2018float\u2019 object cannot be interpreted as an integer\u201d error.<br><\/p>\n\n\n\n<p>In this guide we explain what this error message means and what causes it. We\u2019ll walk through an example of this error so you can figure out how to solve it in your program.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">TypeError: \u2018float\u2019 object cannot be interpreted as an integer<\/h2>\n\n\n\n<p><a href=\"https:\/\/careerkarma.com\/blog\/python-float\/\">Floating-point numbers<\/a> are values that can contain a decimal point. Integers are whole numbers. It is common in programming for these two data types to be distinct.<br><\/p>\n\n\n\n<p>In Python programming, some functions like <a href=\"https:\/\/careerkarma.com\/blog\/python-range\/\">range()<\/a> can only interpret integer values. This is because they are not trained to automatically convert floating point values to an integer.<br><\/p>\n\n\n\n<p>This error is commonly raised when you use <code>range()<\/code> with a floating-point number to create a list of numbers in a given range.<br><\/p>\n\n\n\n<p>Python cannot process this because Python cannot create a list of numbers between a whole number and a decimal number. The Python interpreter would not know how to increment each number in the list if this behavior were allowed.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">An Example Scenario<\/h2>\n\n\n\n<p>We\u2019re going to build a program that calculates the total sales of cheeses at a cheesemonger in the last three months. We\u2019ll ask the user how many cheeses they want to calculate the total sales for. We\u2019ll then perform the calculation.<br><\/p>\n\n\n\n<p>Start by defining a <a href=\"https:\/\/careerkarma.com\/blog\/python-dictionary-values\/\">list of dictionaries<\/a> with information on cheese sales:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>cheeses = [\n\t{ &quot;name&quot;: &quot;Edam&quot;, &quot;sales&quot;: [200, 179, 210] },\n\t{ &quot;name&quot;: &quot;Brie&quot;, &quot;sales&quot;: [142, 133, 135] },\n\t{ &quot;name&quot;: &quot;English Cheddar&quot;, &quot;sales&quot;: [220, 239, 257] }\n]<\/pre><\/div>\n\n\n\n<p>Next, we ask the user how many total sales figures they want to calculate:<br><\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>total_sales = float(input(&quot;How many total sales figures do you want to calculate? &quot;))<\/pre><\/div>\n\n\n\n<p>We convert the value the user inserts to a floating-point. This is because the <a href=\"https:\/\/careerkarma.com\/blog\/python-input\/\">input() method<\/a> returns a string and we cannot use a string in a <code>range()<\/code> statement.<br><\/p>\n\n\n\n<p>Next, we iterate over the first cheeses in our list based on how many figures the cheesemonger wants to calculate. We do this using a <a href=\"https:\/\/careerkarma.com\/blog\/python-for-loop\/\">for loop<\/a> and a <code>range()<\/code> statement:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>for c in range(0, total_sales):\n\tsold = sum(cheeses[c][&quot;sales&quot;])\n\tprint(&quot;{} has been sold {} times over the last three months.&quot;.format(cheeses[c][&quot;name&quot;], sold))<\/pre><\/div>\n\n\n\n<p>Our code uses the <a href=\"https:\/\/careerkarma.com\/blog\/python-sum\/\">sum() method<\/a> to calculate the total number of cheeses sold in the \u201csales\u201d lists in our dictionaries.<br><\/p>\n\n\n\n<p>Print out how many times each cheese has been sold to the console. Our loop runs a number of times equal to how many sales figures the cheesemonger has indicated that they want to calculate.<br><\/p>\n\n\n\n<p>Run our code and see what happens:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>How many total sales figures do you want to calculate? 2\nTraceback (most recent call last):\n  File &quot;main.py&quot;, line 9, in &lt;module&gt;\n\tfor c in range(0, total_sales):\nTypeError: 'float' object cannot be interpreted as an integer<\/pre><\/div>\n\n\n\n<p>Our code asks us how many figures we want to calculate. After we submit a number, our code stops working.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">The Solution<\/h2>\n\n\n\n<p>The problem in our code is that we\u2019re trying to create a range using a floating-point number. In our code, we convert \u201ctotal_sales\u201d to a float. This is because we need a number to create a range using the <code>range()<\/code> statement.<br><\/p>\n\n\n\n<p>The <code>range()<\/code> statement only accepts integers. This means that we should not convert total_sales to a float. We should convert total_sales to an integer instead.<br><\/p>\n\n\n\n<p>To solve this problem, change the line of code where we ask a user how many sales figures they want to calculate:<br><\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>total_sales = int(input(&quot;How many total sales figures do you want to calculate? &quot;))<\/pre><\/div>\n\n\n\n<p>We now convert total_sales to an integer instead of a floating-point value. We perform this conversion using the <a href=\"https:\/\/careerkarma.com\/blog\/python-string-to-int\/\">int() method<\/a>.<br><\/p>\n\n\n\n<p>Let\u2019s run our code:<br><\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>How many total sales figures do you want to calculate? 2\nEdam has been sold 589 times over the last three months.\nBrie has been sold 410 times over the last three months.<\/pre><\/div>\n\n\n\n<p>Our code successfully calculates how many of the first two cheeses in our list were sold.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Conclusion<\/h2>\n\n\n\n<p>The \u201cTypeError: \u2018float\u2019 object cannot be interpreted as an integer\u201d error is raised when you try to use a floating-point number in a place where only an integer is accepted.<br><\/p>\n\n\n\n<p>This error is common when you try to use a floating-point number in a <code>range()<\/code> statement. To solve this error, make sure you use integer values in a <code>range()<\/code> statement, or any other built-in statement that appears to be causing the error.<br><\/p>\n\n\n\n<p>You now have the skills and know-how you need to solve this error like a pro!<\/p>\n","protected":false},"excerpt":{"rendered":"Python has two data types that represent numbers: floats and integers. These data types have distinct properties. If you try to use a float with a function that only supports integers, like the range() function, you\u2019ll encounter the \u201cTypeError: \u2018float\u2019 object cannot be interpreted as an integer\u201d error. In this guide we explain what this&hellip;","protected":false},"author":240,"featured_media":19764,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[16578],"tags":[],"class_list":{"0":"post-21911","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>TypeError: \u2018float\u2019 object cannot be interpreted as an integer<\/title>\n<meta name=\"description\" content=\"On Career Karma, learn how to fix the Python TypeError: \u2018float\u2019 object cannot be interpreted as an integer error.\" \/>\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-typeerror-float-object-cannot-be-interpreted-as-an-integer\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Python TypeError: \u2018float\u2019 object cannot be interpreted as an integer Solution\" \/>\n<meta property=\"og:description\" content=\"On Career Karma, learn how to fix the Python TypeError: \u2018float\u2019 object cannot be interpreted as an integer error.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/careerkarma.com\/blog\/python-typeerror-float-object-cannot-be-interpreted-as-an-integer\/\" \/>\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-08-31T17:28:46+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-12-01T11:58:56+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/07\/thought-catalog-UK78i6vK3sc-unsplash.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1000\" \/>\n\t<meta property=\"og:image:height\" content=\"667\" \/>\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=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/careerkarma.com\/blog\/python-typeerror-float-object-cannot-be-interpreted-as-an-integer\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/python-typeerror-float-object-cannot-be-interpreted-as-an-integer\/\"},\"author\":{\"name\":\"James Gallagher\",\"@id\":\"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94\"},\"headline\":\"Python TypeError: \u2018float\u2019 object cannot be interpreted as an integer Solution\",\"datePublished\":\"2020-08-31T17:28:46+00:00\",\"dateModified\":\"2023-12-01T11:58:56+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/python-typeerror-float-object-cannot-be-interpreted-as-an-integer\/\"},\"wordCount\":654,\"commentCount\":0,\"image\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/python-typeerror-float-object-cannot-be-interpreted-as-an-integer\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/07\/thought-catalog-UK78i6vK3sc-unsplash.jpg\",\"articleSection\":[\"Python\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/careerkarma.com\/blog\/python-typeerror-float-object-cannot-be-interpreted-as-an-integer\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/careerkarma.com\/blog\/python-typeerror-float-object-cannot-be-interpreted-as-an-integer\/\",\"url\":\"https:\/\/careerkarma.com\/blog\/python-typeerror-float-object-cannot-be-interpreted-as-an-integer\/\",\"name\":\"TypeError: \u2018float\u2019 object cannot be interpreted as an integer\",\"isPartOf\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/python-typeerror-float-object-cannot-be-interpreted-as-an-integer\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/python-typeerror-float-object-cannot-be-interpreted-as-an-integer\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/07\/thought-catalog-UK78i6vK3sc-unsplash.jpg\",\"datePublished\":\"2020-08-31T17:28:46+00:00\",\"dateModified\":\"2023-12-01T11:58:56+00:00\",\"author\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94\"},\"description\":\"On Career Karma, learn how to fix the Python TypeError: \u2018float\u2019 object cannot be interpreted as an integer error.\",\"breadcrumb\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/python-typeerror-float-object-cannot-be-interpreted-as-an-integer\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/careerkarma.com\/blog\/python-typeerror-float-object-cannot-be-interpreted-as-an-integer\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/careerkarma.com\/blog\/python-typeerror-float-object-cannot-be-interpreted-as-an-integer\/#primaryimage\",\"url\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/07\/thought-catalog-UK78i6vK3sc-unsplash.jpg\",\"contentUrl\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/07\/thought-catalog-UK78i6vK3sc-unsplash.jpg\",\"width\":1000,\"height\":667},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/careerkarma.com\/blog\/python-typeerror-float-object-cannot-be-interpreted-as-an-integer\/#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 TypeError: \u2018float\u2019 object cannot be interpreted as an integer Solution\"}]},{\"@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":"TypeError: \u2018float\u2019 object cannot be interpreted as an integer","description":"On Career Karma, learn how to fix the Python TypeError: \u2018float\u2019 object cannot be interpreted as an integer error.","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-typeerror-float-object-cannot-be-interpreted-as-an-integer\/","og_locale":"en_US","og_type":"article","og_title":"Python TypeError: \u2018float\u2019 object cannot be interpreted as an integer Solution","og_description":"On Career Karma, learn how to fix the Python TypeError: \u2018float\u2019 object cannot be interpreted as an integer error.","og_url":"https:\/\/careerkarma.com\/blog\/python-typeerror-float-object-cannot-be-interpreted-as-an-integer\/","og_site_name":"Career Karma","article_publisher":"http:\/\/facebook.com\/careerkarmaapp","article_published_time":"2020-08-31T17:28:46+00:00","article_modified_time":"2023-12-01T11:58:56+00:00","og_image":[{"width":1000,"height":667,"url":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/07\/thought-catalog-UK78i6vK3sc-unsplash.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":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/careerkarma.com\/blog\/python-typeerror-float-object-cannot-be-interpreted-as-an-integer\/#article","isPartOf":{"@id":"https:\/\/careerkarma.com\/blog\/python-typeerror-float-object-cannot-be-interpreted-as-an-integer\/"},"author":{"name":"James Gallagher","@id":"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94"},"headline":"Python TypeError: \u2018float\u2019 object cannot be interpreted as an integer Solution","datePublished":"2020-08-31T17:28:46+00:00","dateModified":"2023-12-01T11:58:56+00:00","mainEntityOfPage":{"@id":"https:\/\/careerkarma.com\/blog\/python-typeerror-float-object-cannot-be-interpreted-as-an-integer\/"},"wordCount":654,"commentCount":0,"image":{"@id":"https:\/\/careerkarma.com\/blog\/python-typeerror-float-object-cannot-be-interpreted-as-an-integer\/#primaryimage"},"thumbnailUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/07\/thought-catalog-UK78i6vK3sc-unsplash.jpg","articleSection":["Python"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/careerkarma.com\/blog\/python-typeerror-float-object-cannot-be-interpreted-as-an-integer\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/careerkarma.com\/blog\/python-typeerror-float-object-cannot-be-interpreted-as-an-integer\/","url":"https:\/\/careerkarma.com\/blog\/python-typeerror-float-object-cannot-be-interpreted-as-an-integer\/","name":"TypeError: \u2018float\u2019 object cannot be interpreted as an integer","isPartOf":{"@id":"https:\/\/careerkarma.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/careerkarma.com\/blog\/python-typeerror-float-object-cannot-be-interpreted-as-an-integer\/#primaryimage"},"image":{"@id":"https:\/\/careerkarma.com\/blog\/python-typeerror-float-object-cannot-be-interpreted-as-an-integer\/#primaryimage"},"thumbnailUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/07\/thought-catalog-UK78i6vK3sc-unsplash.jpg","datePublished":"2020-08-31T17:28:46+00:00","dateModified":"2023-12-01T11:58:56+00:00","author":{"@id":"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94"},"description":"On Career Karma, learn how to fix the Python TypeError: \u2018float\u2019 object cannot be interpreted as an integer error.","breadcrumb":{"@id":"https:\/\/careerkarma.com\/blog\/python-typeerror-float-object-cannot-be-interpreted-as-an-integer\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/careerkarma.com\/blog\/python-typeerror-float-object-cannot-be-interpreted-as-an-integer\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/careerkarma.com\/blog\/python-typeerror-float-object-cannot-be-interpreted-as-an-integer\/#primaryimage","url":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/07\/thought-catalog-UK78i6vK3sc-unsplash.jpg","contentUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/07\/thought-catalog-UK78i6vK3sc-unsplash.jpg","width":1000,"height":667},{"@type":"BreadcrumbList","@id":"https:\/\/careerkarma.com\/blog\/python-typeerror-float-object-cannot-be-interpreted-as-an-integer\/#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 TypeError: \u2018float\u2019 object cannot be interpreted as an integer Solution"}]},{"@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\/21911","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=21911"}],"version-history":[{"count":0,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/posts\/21911\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/media\/19764"}],"wp:attachment":[{"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/media?parent=21911"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/categories?post=21911"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/tags?post=21911"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}