{"id":74622,"date":"2019-12-30T10:36:53","date_gmt":"2019-12-30T05:06:53","guid":{"rendered":"https:\/\/techvidvan.com\/tutorials\/?p=74622"},"modified":"2024-08-22T18:00:41","modified_gmt":"2024-08-22T12:30:41","slug":"python-numbers","status":"publish","type":"post","link":"https:\/\/techvidvan.com\/tutorials\/python-numbers\/","title":{"rendered":"Python Numbers &#8211; Three cheers for int, float and complex numbers"},"content":{"rendered":"<p>In this article, we will explore the different types of numbers in Python: integers (int), floating-point numbers (float), and complex numbers (complex). We&#8217;ll also see how to convert numbers from one type to another, known as type conversions. By the end, you&#8217;ll have a solid understanding of Python numbers and how to use them in your programs. Let&#8217;s get started and dive into the world of Python numbers!<\/p>\n<h3>Python Number Types<\/h3>\n<p>Python has basically three numeric data types named as <strong>int<\/strong>, <strong>float<\/strong>, and <strong>complex<\/strong>. Since Python is a dynamically typed language we don\u2019t have to define the <strong>data type<\/strong>. It automatically <strong>recognizes<\/strong> the data type during runtime when we assign the variable.<\/p>\n<h4>1. Python int<\/h4>\n<p>In math, an integer is a whole number that can be either positive or negative and does not have any fractional value. Python&#8217;s int type is the same, allowing us to create integer objects directly by assigning a numeric value to them. These integers are precise and efficient, suitable for tasks that require exact whole numbers. Python also handles very large integers seamlessly, enabling calculations with big numbers without overflow issues.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">Num1 = 45\r\nNum2 = -10\r\nprint( Num1, Num2)\r\ntype(Num1)<\/pre>\n<p><strong>Output:<\/strong><\/p>\n<div class=\"code-output\">45 -10<\/div>\n<p>In Python, there is no limit to how <strong>long<\/strong> a number can be. It is only constrained by the amount of <strong>memory<\/strong> your system has.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">Num = 99999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999 + 1\r\nprint(Num)<\/pre>\n<p><strong>Output:<\/strong><\/p>\n<div class=\"code-output\">100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000<\/div>\n<p><strong>Note:<\/strong><\/p>\n<p>The <strong>division operator(\u2018\/\u2019)<\/strong> will convert the <strong>number<\/strong> into <strong>float<\/strong>. We use<strong> (\u2018\/\/\u2019)<\/strong> to do<strong> integer division<\/strong>.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">print(4\/2)\r\ntype(4\/2)\r\n\r\nprint(4\/\/2)\r\ntype(4\/\/2)<\/pre>\n<p><strong>Output:<\/strong><\/p>\n<div class=\"code-output\">2.0<br \/>\n&lt;class \u2018float\u2019&gt;<br \/>\n2<br \/>\n&lt;class \u2018int\u2019&gt;<\/div>\n<h4>Python Integers Representation in different base<\/h4>\n<p>The default integer representation is in Decimal<strong> (base 10)<\/strong>, but we can also store them as <strong>Binary<\/strong>, <strong>Octal<\/strong> or <strong>Hexadecimal<\/strong>.<\/p>\n<p>They require a <strong>prefix<\/strong> before the number.<a href=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2019\/12\/representation-of-python-integers-in-different-base.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-74945 size-full\" src=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2019\/12\/representation-of-python-integers-in-different-base.jpg\" alt=\"python numbers representation of integers\" width=\"569\" height=\"290\" \/><\/a><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">print(0b100, 0B100) #100 in binary\r\nprint(0o100, 0O100) #100 in octal\r\nprint(0x100, 0X100) #100 in hexadecimal<\/pre>\n<p><strong>Output:<\/strong><\/p>\n<div class=\"code-output\">4 4<br \/>\n64 64<br \/>\n246 256<\/div>\n<p>The type of Python integers is the same in all the <strong>different<\/strong> <strong>representations<\/strong>.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">type(0b01)\r\ntype(0o10)\r\ntype(0x10)<\/pre>\n<p><strong>Output:<\/strong><\/p>\n<div class=\"code-output\">&lt;class &#8216;int&#8217;&gt;<br \/>\n&lt;class &#8216;int&#8217;&gt;<br \/>\n&lt;class &#8216;int&#8217;&gt;<\/div>\n<h4>2. Python float<\/h4>\n<p>In floating-point numbers, there is no fixed number of digits before or after the decimal point, allowing for the representation of very large or very small numbers with fractional parts. In Python, float is used to define these real numbers that have a decimal point. This type is particularly useful for calculations requiring precision, such as scientific computations or financial analysis.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">X = 1.0\r\nY = 25.125\r\nZ = - 48.1928569\r\n\r\nprint(X, Y, Z)\r\ntype(X)<\/pre>\n<p><strong>Output:<\/strong><\/p>\n<div class=\"code-output\">1.0 25.125 -48.1928569<br \/>\n&lt;class \u2018float\u2019&gt;<\/div>\n<h4>Scientific Notation of Float Numbers<\/h4>\n<p>Float numbers can also be represented in scientific notation by using the character <strong>\u2018e\u2019<\/strong> or <strong>\u2018E\u2019<\/strong>.<\/p>\n<p><strong>For example,<\/strong> 0.01 can be denoted as 1e-2.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">X = 1e-2\r\nY = 4e5\r\nZ = 2.5e105\r\n\r\nprint(X)\r\nprint(Y)\r\nprint(Z)<\/pre>\n<p><strong>Output:<\/strong><\/p>\n<div class=\"code-output\">0.01<br \/>\n400000.0<br \/>\n2.5e + 105<\/div>\n<p>The <strong>limit<\/strong> to floating-point numbers is that it can only store values up to<strong> 1.79 * 10^308<\/strong>. Values maximum than this will be represented with<strong> \u2018inf\u2019<\/strong>.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">print(1.79e308)\r\nprint(1.8e308)<\/pre>\n<p><strong>Output:<\/strong><\/p>\n<div class=\"code-output\">1.79e + 308<br \/>\nInf<\/div>\n<h4>3. Python Complex number<\/h4>\n<p>Complex numbers are represented in the form of <strong>(a+ib)<\/strong>, where a is called the <strong>real part<\/strong> and b is called the <strong>imaginary part<\/strong>. Python uses <strong>j<\/strong> instead of<strong> i<\/strong>.<\/p>\n<p>Let\u2019s see the representation of a complex number in code.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">X = 4+2j\r\nY = 2-5j\r\nZ = -5j\r\n\r\nprint(X)\r\nprint(Y)\r\nprint(Z)\r\n\r\ntype(5-4j)<\/pre>\n<p><strong>Output:<\/strong><\/p>\n<div class=\"code-output\">(4+2j)<br \/>\n(2-5j)<br \/>\n(-0-5j)<br \/>\n&lt;class \u2018complex\u2019&gt;<\/div>\n<p><strong>Note:<\/strong><\/p>\n<p>It is compulsory to define the <strong>coefficient<\/strong> of the imaginary part, otherwise, the j will be considered as a <strong>variable<\/strong>.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">X = 4 + j # NameError: name \u2018j\u2019 is not defined\r\nY = 4 + 1j # Valid complex number\r\n<\/pre>\n<h4>Python Type Conversion<\/h4>\n<p>Type conversion is the process of <strong>converting<\/strong> data types from one type to another.<\/p>\n<p><strong>For example, <\/strong>an integer value is converted into a float, or a string is converted into a number.<\/p>\n<p>Type conversion can occur in one of the two types &#8211;<\/p>\n<ul>\n<li>Implicit Conversion<\/li>\n<li>Explicit Conversion<a href=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2019\/12\/type-conversion-in-python.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-74790 size-full\" src=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2019\/12\/type-conversion-in-python.jpg\" alt=\"type conversion in Python numbers\" width=\"686\" height=\"313\" \/><\/a><\/li>\n<\/ul>\n<h4>1. Implicit Conversion in Python<\/h4>\n<p>In implicit conversion, the Python <strong>automatically<\/strong> converts the value from one type to another.<\/p>\n<p><strong>For example:<\/strong> when we add an integer and a float value, the resultant will be in float value.<\/p>\n<p>In these types of situations, Python always converts the <strong>smaller<\/strong> data types into <strong>larger<\/strong> data types so that data is <strong>not lost<\/strong>.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">X = 12\r\nY = 20.50\r\nZ = X + Y\r\nprint(Z)\r\n\r\ntype(X)\r\ntype(Y)\r\ntype(Z)<\/pre>\n<p><strong>Output:<\/strong><\/p>\n<div class=\"code-output\">32.5<br \/>\n&lt;class \u2018int\u2019&gt;<br \/>\n&lt;class \u2018float\u2019&gt;<br \/>\n&lt;class \u2018float\u2019&gt;<\/div>\n<p>However, when we add a string and an integer together, Python is not able to use <strong>implicit conversion<\/strong> and it will give us a <strong>TypeError<\/strong>. We can achieve this task by explicitly converting the <strong>data type<\/strong>.<\/p>\n<h4>2. Explicit Conversion in Python<\/h4>\n<p>In explicit conversion, users convert the data type of an object to the <strong>required<\/strong> data type. To perform the explicit conversion, we have some predefined functions like <strong>int()<\/strong>, <strong>float()<\/strong>, <strong>str(),<\/strong> <strong>hex()<\/strong>, <strong>oct()<\/strong>, etc. This process is also called <strong>Type Casting<\/strong>.<\/p>\n<p>One thing to note here is that some data can be <strong>lost<\/strong> during typecasting.<\/p>\n<p><strong>a. int()<\/strong><\/p>\n<p>The int() function can <strong>convert<\/strong> another <strong>numeric<\/strong> or <strong>string<\/strong> data type into an <strong>integer<\/strong> type.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">print( int(5.25) )\r\nprint( int(5.80) )\r\nprint( int(\u201c456\u201d) )\r\nprint( int(0b1010) )<\/pre>\n<p><strong>Output:<\/strong><\/p>\n<div class=\"code-output\">5<br \/>\n5<br \/>\n456<br \/>\n10<\/div>\n<p>As you can see, while converting to an integer, Python <strong>discards<\/strong> the numbers after the <strong>decimal point<\/strong>.<\/p>\n<p><strong>Note: <\/strong><\/p>\n<p>You can\u2019t convert a complex number into an integer. Python will give you <strong>TypeError<\/strong>.<\/p>\n<p><strong>b. float()<\/strong><\/p>\n<p>This function converts other numeric values into <strong>floating values<\/strong>.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">print( float(5) )\r\nprint( float(0xb) )<\/pre>\n<p><strong>Output:<\/strong><\/p>\n<div class=\"code-output\">5.0<br \/>\n11.0<\/div>\n<p><strong>Note:<\/strong><\/p>\n<p>Complex numbers <strong>can not<\/strong> be converted into float values either.<\/p>\n<p><strong>c. complex()<\/strong><\/p>\n<p>Numeric values can be <strong>converted<\/strong> into complex numbers with <strong>complex() function<\/strong>.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">print( complex(3) )\r\nprint( complex(8.5))<\/pre>\n<p><strong>Output:<\/strong><\/p>\n<div class=\"code-output\">(5 + 0j)<br \/>\n(8.5 + 0j)<\/div>\n<p><strong>d.\u00a0 bin()<\/strong><\/p>\n<p>The <strong>function bin()<\/strong> will convert integer numbers into their <strong>binary representation<\/strong>.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">print( bin(20) )\r\nprint( bin(4) )<\/pre>\n<p><strong>Output:<\/strong><\/p>\n<div class=\"code-output\">0b10100<br \/>\n0b100<\/div>\n<p><strong>e. oct()<\/strong><\/p>\n<p><strong>oct() function<\/strong> will convert integer numbers into their <strong>octal representations<\/strong>.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">print( oct(20) )\r\nprint( oct(4) )<\/pre>\n<p><strong>Output:<\/strong><\/p>\n<div class=\"code-output\">0b10100<br \/>\n0b100<\/div>\n<p><strong>f.\u00a0 hex()<\/strong><\/p>\n<p>The <strong>function hex()<\/strong> also converts the integer numbers into <strong>hexadecimal representations<\/strong>.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">print( oct(10) )\r\nprint( oct(5000) )<\/pre>\n<p><strong>Output:<\/strong><\/p>\n<div class=\"code-output\">0xa<br \/>\n0x1388<\/div>\n<p><strong>Note: bin()<\/strong>, <strong>oct()<\/strong> and <strong>hex()<\/strong> function are only used for <strong>integer values<\/strong>, <strong>float<\/strong>, and <strong>complex numbers<\/strong> cannot be converted through them.<\/p>\n<h3>Summary<\/h3>\n<p>This article made a detailed talk about Python numbers and their different types: <strong>int<\/strong>, <strong>float<\/strong> and <strong>complex<\/strong> <strong>numbers<\/strong>. We also saw how they can be represented in <strong>binary<\/strong>, <strong>octal<\/strong>, and <strong>hexadecimal<\/strong>.<\/p>\n<p>Later on, we understood the <strong>type conversion<\/strong> and how you can convert it from one type to another and also saw the <strong>limitations<\/strong> of each of them.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this article, we will explore the different types of numbers in Python: integers (int), floating-point numbers (float), and complex numbers (complex). We&#8217;ll also see how to convert numbers from one type to another,&#46;&#46;&#46;<\/p>\n","protected":false},"author":1,"featured_media":74791,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1053],"tags":[1143,1145,1147,1149,1151,1152,1153],"class_list":["post-74622","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-python","tag-implicit-conversion-in-python","tag-python-complex-numbers","tag-python-float","tag-python-int","tag-python-number-types","tag-python-numbers","tag-type-conversion"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.7 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Python Numbers - Three cheers for int, float and complex numbers - TechVidvan<\/title>\n<meta name=\"description\" content=\"Python Numbers - Explore different types of numbers &amp; understand how to work with them in Python &amp; see how numbers can be converted from one form to other.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/techvidvan.com\/tutorials\/python-numbers\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Python Numbers - Three cheers for int, float and complex numbers - TechVidvan\" \/>\n<meta property=\"og:description\" content=\"Python Numbers - Explore different types of numbers &amp; understand how to work with them in Python &amp; see how numbers can be converted from one form to other.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/techvidvan.com\/tutorials\/python-numbers\/\" \/>\n<meta property=\"og:site_name\" content=\"TechVidvan\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/TechVidvan\/\" \/>\n<meta property=\"article:published_time\" content=\"2019-12-30T05:06:53+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-08-22T12:30:41+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2019\/12\/python-numbers.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"802\" \/>\n\t<meta property=\"og:image:height\" content=\"420\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"TechVidvan Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@vidvantech\" \/>\n<meta name=\"twitter:site\" content=\"@vidvantech\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"TechVidvan Team\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Python Numbers - Three cheers for int, float and complex numbers - TechVidvan","description":"Python Numbers - Explore different types of numbers & understand how to work with them in Python & see how numbers can be converted from one form to other.","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:\/\/techvidvan.com\/tutorials\/python-numbers\/","og_locale":"en_US","og_type":"article","og_title":"Python Numbers - Three cheers for int, float and complex numbers - TechVidvan","og_description":"Python Numbers - Explore different types of numbers & understand how to work with them in Python & see how numbers can be converted from one form to other.","og_url":"https:\/\/techvidvan.com\/tutorials\/python-numbers\/","og_site_name":"TechVidvan","article_publisher":"https:\/\/www.facebook.com\/TechVidvan\/","article_published_time":"2019-12-30T05:06:53+00:00","article_modified_time":"2024-08-22T12:30:41+00:00","og_image":[{"width":802,"height":420,"url":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2019\/12\/python-numbers.jpg","type":"image\/jpeg"}],"author":"TechVidvan Team","twitter_card":"summary_large_image","twitter_creator":"@vidvantech","twitter_site":"@vidvantech","twitter_misc":{"Written by":"TechVidvan Team","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/techvidvan.com\/tutorials\/python-numbers\/#article","isPartOf":{"@id":"https:\/\/techvidvan.com\/tutorials\/python-numbers\/"},"author":{"name":"TechVidvan Team","@id":"https:\/\/techvidvan.com\/tutorials\/#\/schema\/person\/e9c26e74dd3d87421f7ada9433b8cd22"},"headline":"Python Numbers &#8211; Three cheers for int, float and complex numbers","datePublished":"2019-12-30T05:06:53+00:00","dateModified":"2024-08-22T12:30:41+00:00","mainEntityOfPage":{"@id":"https:\/\/techvidvan.com\/tutorials\/python-numbers\/"},"wordCount":946,"commentCount":0,"publisher":{"@id":"https:\/\/techvidvan.com\/tutorials\/#organization"},"image":{"@id":"https:\/\/techvidvan.com\/tutorials\/python-numbers\/#primaryimage"},"thumbnailUrl":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2019\/12\/python-numbers.jpg","keywords":["implicit conversion in python","python complex numbers","Python float","Python int","python number types","python numbers","Type Conversion"],"articleSection":["Python Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/techvidvan.com\/tutorials\/python-numbers\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/techvidvan.com\/tutorials\/python-numbers\/","url":"https:\/\/techvidvan.com\/tutorials\/python-numbers\/","name":"Python Numbers - Three cheers for int, float and complex numbers - TechVidvan","isPartOf":{"@id":"https:\/\/techvidvan.com\/tutorials\/#website"},"primaryImageOfPage":{"@id":"https:\/\/techvidvan.com\/tutorials\/python-numbers\/#primaryimage"},"image":{"@id":"https:\/\/techvidvan.com\/tutorials\/python-numbers\/#primaryimage"},"thumbnailUrl":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2019\/12\/python-numbers.jpg","datePublished":"2019-12-30T05:06:53+00:00","dateModified":"2024-08-22T12:30:41+00:00","description":"Python Numbers - Explore different types of numbers & understand how to work with them in Python & see how numbers can be converted from one form to other.","breadcrumb":{"@id":"https:\/\/techvidvan.com\/tutorials\/python-numbers\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/techvidvan.com\/tutorials\/python-numbers\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/techvidvan.com\/tutorials\/python-numbers\/#primaryimage","url":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2019\/12\/python-numbers.jpg","contentUrl":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2019\/12\/python-numbers.jpg","width":802,"height":420,"caption":"Python numbers"},{"@type":"BreadcrumbList","@id":"https:\/\/techvidvan.com\/tutorials\/python-numbers\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/techvidvan.com\/tutorials\/"},{"@type":"ListItem","position":2,"name":"Python Numbers &#8211; Three cheers for int, float and complex numbers"}]},{"@type":"WebSite","@id":"https:\/\/techvidvan.com\/tutorials\/#website","url":"https:\/\/techvidvan.com\/tutorials\/","name":"TechVidvan Blogs","description":"","publisher":{"@id":"https:\/\/techvidvan.com\/tutorials\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/techvidvan.com\/tutorials\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/techvidvan.com\/tutorials\/#organization","name":"TechVidvan","url":"https:\/\/techvidvan.com\/tutorials\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/techvidvan.com\/tutorials\/#\/schema\/logo\/image\/","url":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2024\/03\/techvidvan-logo-200x50-1.webp","contentUrl":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2024\/03\/techvidvan-logo-200x50-1.webp","width":200,"height":50,"caption":"TechVidvan"},"image":{"@id":"https:\/\/techvidvan.com\/tutorials\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/TechVidvan\/","https:\/\/x.com\/vidvantech"]},{"@type":"Person","@id":"https:\/\/techvidvan.com\/tutorials\/#\/schema\/person\/e9c26e74dd3d87421f7ada9433b8cd22","name":"TechVidvan Team","description":"The TechVidvan Team delivers practical, beginner-friendly tutorials on programming, Java, Python, C++, DSA, AI, ML, data Science, Android, Flutter, MERN, Web Development, and technology. Our experts are here to help you upskill and excel in today\u2019s tech industry."}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/posts\/74622","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/comments?post=74622"}],"version-history":[{"count":2,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/posts\/74622\/revisions"}],"predecessor-version":[{"id":447676,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/posts\/74622\/revisions\/447676"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/media\/74791"}],"wp:attachment":[{"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/media?parent=74622"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/categories?post=74622"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/tags?post=74622"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}