{"id":74778,"date":"2019-12-27T11:17:21","date_gmt":"2019-12-27T05:47:21","guid":{"rendered":"https:\/\/techvidvan.com\/tutorials\/?p=74778"},"modified":"2019-12-27T11:17:21","modified_gmt":"2019-12-27T05:47:21","slug":"project-in-python-typing-speed-test","status":"publish","type":"post","link":"https:\/\/techvidvan.com\/tutorials\/project-in-python-typing-speed-test\/","title":{"rendered":"Python Project on Typing Speed Test &#8211; Build your first game in Python"},"content":{"rendered":"<p><strong>Project in Python &#8211; Typing Speed Test<\/strong><\/p>\n<p>Have you played a typing speed game? It&#8217;s a very useful game to track your typing speed and improve it with regular practice. Now, you will be able to build your own typing speed game in Python by just following a few steps.<\/p>\n<h3>About the Python Project<\/h3>\n<p><a href=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2019\/12\/Typing-Speed-Test-Project-in-Python.gif\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-74844\" src=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2019\/12\/Typing-Speed-Test-Project-in-Python.gif\" alt=\"Typing Speed Test for project in python \" width=\"640\" height=\"452\" \/><\/a><\/p>\n<p>In this Python project idea, we are going to build an exciting project through which you can <strong>check<\/strong> and even <strong>improve<\/strong> your typing speed. For a graphical user interface, we are going to use the <strong>pygame<\/strong> library which is used for working with graphics. We will draw the images and text to be displayed on the screen.<\/p>\n<p><em><strong>WAIT! Have you worked on the 1st Python project in 20 project series by TechVidvan &#8211; <a href=\"https:\/\/techvidvan.com\/tutorials\/python-game-project-tic-tac-toe\/\">Python Game Project on Tic Tac Toe<\/a><\/strong><\/em><\/p>\n<h3>Prerequisites<\/h3>\n<p>The project in Python requires you to have basic knowledge of python programming and the pygame library.<\/p>\n<p>To install the pygame library, type the following code in your terminal.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">pip install pygame<\/pre>\n<h2>Steps to Build the Python Project on Typing Speed Test<\/h2>\n<p>You can download the full source code of the project from this link:<\/p>\n<p><strong><a href=\"https:\/\/drive.google.com\/open?id=10WrUIQQph3jv0T8Y7yhFpPzRA0upd2p8\">Typing Speed Test Python Project File<\/a><\/strong><\/p>\n<p>Let us understand the file structure of the Python project with source code that we are going to build:<\/p>\n<p><a href=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2019\/12\/project-in-python-file-structure-1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"img-gray-border aligncenter wp-image-74835 size-full\" src=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2019\/12\/project-in-python-file-structure-1.png\" alt=\"file structure of project in python\" width=\"1366\" height=\"728\" \/><\/a><\/p>\n<ul>\n<li><strong>Background.jpg &#8211;<\/strong> A background image we will use in our program<\/li>\n<li><strong>Icon.png &#8211;<\/strong> An icon image that we will use as a reset button.<\/li>\n<li><strong>Sentences.txt &#8211;<\/strong> This text file will contain a list of sentences separated by a new line.<\/li>\n<li><strong>Speed typing.py &#8211;<\/strong> The main program file that contains all the code<\/li>\n<li><strong>Typing-speed-open.png &#8211;<\/strong> The image to display when starting game<\/li>\n<\/ul>\n<p>First, we have created the sentences.txt file in which we have added multiple sentences separated by a new line.<\/p>\n<p>This time we will be using an Object-oriented approach to build the program.<\/p>\n<h3>1. Import the libraries<\/h3>\n<p>For this project based on Python, we are using the pygame library. So we need to import the library along with some built-in modules of Python like time and random library.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">import pygame\nfrom pygame.locals import *\nimport sys\nimport time\nimport random<\/pre>\n<h3>2. Create the game class<\/h3>\n<p>Now we create the game class which will involve many functions responsible for starting the game, reset the game and few helper functions to perform calculations that are required for our project in Python.<\/p>\n<p>Let\u2019s go ahead and create the constructor for our class where we define all the variables we will use in our project.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">class Game:\n\n    def __init__(self):\n        self.w=750\n        self.h=500\n        self.reset=True\n        self.active = False\n        self.input_text=''\n        self.word = ''\n        self.time_start = 0\n        self.total_time = 0\n        self.accuracy = '0%'\n        self.results = 'Time:0 Accuracy:0 % Wpm:0 '\n        self.wpm = 0\n        self.end = False\n        self.HEAD_C = (255,213,102)\n        self.TEXT_C = (240,240,240)\n        self.RESULT_C = (255,70,70)\n\n\n        pygame.init()\n        self.open_img = pygame.image.load('type-speed-open.png')\n        self.open_img = pygame.transform.scale(self.open_img, (self.w,self.h))\n\n\n        self.bg = pygame.image.load('background.jpg')\n        self.bg = pygame.transform.scale(self.bg, (500,750))\n\n        self.screen = pygame.display.set_mode((self.w,self.h))\n        pygame.display.set_caption('Type Speed test')<\/pre>\n<p>In this constructor, we have initialized the width and height of the window, variables that are needed for calculation and then we initialized the pygame and loaded the images. The screen variable is the most important on which we will draw everything.<\/p>\n<h3>3. draw_text() method<\/h3>\n<p>The draw_text() method of Game class is a <strong>helper function<\/strong> that will draw the text on the screen. The argument it takes is the screen, the message we want to draw, the y coordinate of the screen to position our text, the size of the font and color of the font. We will draw everything in the center of the screen. After drawing anything on the screen, pygame requires you to update the screen.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">def draw_text(self, screen, msg, y ,fsize, color):\n    font = pygame.font.Font(None, fsize)\n    text = font.render(msg, 1,color)\n    text_rect = text.get_rect(center=(self.w\/2, y))\n    screen.blit(text, text_rect)\n    pygame.display.update()<\/pre>\n<h3>4. get_sentence() method<\/h3>\n<p>Remember that we have a list of sentences in our sentences.txt file? The get_sentence() method will open up the file and <strong>return a random sentence<\/strong> from the list. We split the whole <a href=\"https:\/\/developers.google.com\/edu\/python\/strings\">string<\/a> with a newline character.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">def get_sentence(self):\n    f = open('sentences.txt').read()\n    sentences = f.split('\\n')\n    sentence = random.choice(sentences)\n    return sentence<\/pre>\n<h3>5. show_results() method<\/h3>\n<p>The show_results() method is where we <strong>calculate the speed<\/strong> of the user\u2019s typing. The time starts when the user clicks on the input box and when the user hits return key \u201cEnter\u201d then we perform the difference and calculate time in seconds.<\/p>\n<p>To calculate accuracy, we did a little bit of math. We counted the correct typed characters by comparing input text with the display text which the user had to type.<\/p>\n<p><em>The formula for accuracy is:<\/em><\/p>\n<p><strong>(correct characters)x100\/ (total characters in sentence)<\/strong><\/p>\n<p>The WPM is the words per minute. A typical word consists of around 5 characters, so we calculate the words per minute by dividing the total number of words with five and then the result is again divided that with the total time it took in minutes. Since our total time was in seconds, we had to convert it into minutes by dividing total time with 60.<\/p>\n<p>At last, we have drawn the typing icon image at the bottom of the screen which we will use as a reset button. When the user clicks it, our game would reset. We will see the reset_game() method later in this article.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">def show_results(self, screen):\n    if(not self.end):\n        #Calculate time\n        self.total_time = time.time() - self.time_start\n\n        #Calculate accuracy\n        count = 0\n        for i,c in enumerate(self.word):\n            try:\n                if self.input_text[i] == c:\n                    count += 1\n            except:\n                pass\n        self.accuracy = count\/len(self.word)*100\n\n        #Calculate words per minute\n        self.wpm = len(self.input_text)*60\/(5*self.total_time)\n        self.end = True\n        print(self.total_time)\n\n        self.results = 'Time:'+str(round(self.total_time)) +\" secs Accuracy:\"+ str(round(self.accuracy)) + \"%\" + ' Wpm: ' + str(round(self.wpm))\n\n        # draw icon image\n        self.time_img = pygame.image.load('icon.png')\n        self.time_img = pygame.transform.scale(self.time_img, (150,150))\n        #screen.blit(self.time_img, (80,320))\n        screen.blit(self.time_img, (self.w\/2-75,self.h-140))\n        self.draw_text(screen,\"Reset\", self.h - 70, 26, (100,100,100))\n\n        print(self.results)\n        pygame.display.update()<\/pre>\n<h3>6. run() method<\/h3>\n<p>This is the main method of our class that will<strong> handle all the events<\/strong>. We call the reset_game() method at the starting of this method which resets all the variables. Next, we run an infinite loop which will capture all the mouse and keyboard events. Then, we draw the heading and the input box on the screen.<\/p>\n<p>We then use another <a href=\"https:\/\/docs.python.org\/3\/tutorial\/controlflow.html\">loop<\/a> that will look for the mouse and keyboard events. When the mouse button is pressed, we check the position of the mouse if it is on the input box then we start the time and set the active to True. If it is on the reset button, then we reset the game.<\/p>\n<p>When the active is True and typing has not ended then we look for keyboard events. If the user presses any key then we need to update the message on our input box. The enter key will end typing and we will calculate the scores to display it. Another event of a backspace is used to trim the input text by removing the last character.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">def run(self):\n    self.reset_game()\n\n\n    self.running=True\n    while(self.running):\n        clock = pygame.time.Clock()\n        self.screen.fill((0,0,0), (50,250,650,50))\n        pygame.draw.rect(self.screen,self.HEAD_C, (50,250,650,50), 2)\n        # update the text of user input\n        self.draw_text(self.screen, self.input_text, 274, 26,(250,250,250))\n        pygame.display.update()\n        for event in pygame.event.get():\n            if event.type == QUIT:\n                self.running = False\n                sys.exit()\n            elif event.type == pygame.MOUSEBUTTONUP:\n                x,y = pygame.mouse.get_pos()\n                # position of input box\n                if(x&gt;=50 and x&lt;=650 and y&gt;=250 and y&lt;=300):\n                    self.active = True\n                    self.input_text = ''\n                    self.time_start = time.time()\n                 # position of reset box\n                 if(x&gt;=310 and x&lt;=510 and y&gt;=390 and self.end):\n                    self.reset_game()\n                    x,y = pygame.mouse.get_pos()\n\n\n            elif event.type == pygame.KEYDOWN:\n                if self.active and not self.end:\n                    if event.key == pygame.K_RETURN:\n                        print(self.input_text)\n                        self.show_results(self.screen)\n                        print(self.results)\n                        self.draw_text(self.screen, self.results,350, 28, self.RESULT_C)\n                        self.end = True\n\n                    elif event.key == pygame.K_BACKSPACE:\n                        self.input_text = self.input_text[:-1]\n                    else:\n                        try:\n                            self.input_text += event.unicode\n                        except:\n                            pass\n\n        pygame.display.update()\n\n\n    clock.tick(60)<\/pre>\n<h3>7. reset_game() method<\/h3>\n<p>The reset_game() method <strong>resets all variables<\/strong> so that we can start testing our typing speed again. We also select a random sentence by calling the get_sentence() method. In the end, we have closed the class definition and created the object of Game class to run the program.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">    def reset_game(self):\n        self.screen.blit(self.open_img, (0,0))\n\n        pygame.display.update()\n        time.sleep(1)\n\n        self.reset=False\n        self.end = False\n\n        self.input_text=''\n        self.word = ''\n        self.time_start = 0\n        self.total_time = 0\n        self.wpm = 0\n\n        # Get random sentence\n        self.word = self.get_sentence()\n        if (not self.word): self.reset_game()\n        #drawing heading\n        self.screen.fill((0,0,0))\n        self.screen.blit(self.bg,(0,0))\n        msg = \"Typing Speed Test\"\n        self.draw_text(self.screen, msg,80, 80,self.HEAD_C)\n        # draw the rectangle for input box\n        pygame.draw.rect(self.screen,(255,192,25), (50,250,650,50), 2)\n\n        # draw the sentence string\n        self.draw_text(self.screen, self.word,200, 28,self.TEXT_C)\n\n        pygame.display.update()\n\n\n\nGame().run()<\/pre>\n<p><strong>Output:<\/strong><\/p>\n<p><a href=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2019\/12\/typing-speed-test-start-python-project.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-74828\" src=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2019\/12\/typing-speed-test-start-python-project.png\" alt=\"typing speed test start - project in python\" width=\"750\" height=\"530\" \/><\/a><\/p>\n<p><a href=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2019\/12\/typing-speed-test-stop-python-project-idea.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-74829\" src=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2019\/12\/typing-speed-test-stop-python-project-idea.png\" alt=\"typing speed test end - project in python\" width=\"750\" height=\"530\" \/><\/a><\/p>\n<h2>Summary<\/h2>\n<p>In this article, you worked on the Python project to build your own game of typing speed testing with the help of pygame library.<\/p>\n<p>I hope you got to learn new things and enjoyed building this interesting Python project. Do share the article on social media with your friends and colleagues.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Project in Python &#8211; Typing Speed Test Have you played a typing speed game? It&#8217;s a very useful game to track your typing speed and improve it with regular practice. Now, you will be&#46;&#46;&#46;<\/p>\n","protected":false},"author":1,"featured_media":74846,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1053],"tags":[1204,1205,483,1206,1207,1208,1210,1212],"class_list":["post-74778","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-python","tag-project-in-python","tag-pygame-library","tag-python-project","tag-python-project-example","tag-python-project-for-practice","tag-python-project-idea","tag-typing-speed-game","tag-typing-speed-test"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.7 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Python Project on Typing Speed Test - Build your first game in Python - TechVidvan<\/title>\n<meta name=\"description\" content=\"Python project on wpm test - Learn to build an application using pygame library that will detect your typing speed and help you to improve 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:\/\/techvidvan.com\/tutorials\/project-in-python-typing-speed-test\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Python Project on Typing Speed Test - Build your first game in Python - TechVidvan\" \/>\n<meta property=\"og:description\" content=\"Python project on wpm test - Learn to build an application using pygame library that will detect your typing speed and help you to improve it.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/techvidvan.com\/tutorials\/project-in-python-typing-speed-test\/\" \/>\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-27T05:47:21+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2019\/12\/project-in-python-on-typing-speed-test.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=\"8 minutes\" \/>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Python Project on Typing Speed Test - Build your first game in Python - TechVidvan","description":"Python project on wpm test - Learn to build an application using pygame library that will detect your typing speed and help you to improve 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:\/\/techvidvan.com\/tutorials\/project-in-python-typing-speed-test\/","og_locale":"en_US","og_type":"article","og_title":"Python Project on Typing Speed Test - Build your first game in Python - TechVidvan","og_description":"Python project on wpm test - Learn to build an application using pygame library that will detect your typing speed and help you to improve it.","og_url":"https:\/\/techvidvan.com\/tutorials\/project-in-python-typing-speed-test\/","og_site_name":"TechVidvan","article_publisher":"https:\/\/www.facebook.com\/TechVidvan\/","article_published_time":"2019-12-27T05:47:21+00:00","og_image":[{"width":802,"height":420,"url":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2019\/12\/project-in-python-on-typing-speed-test.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":"8 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/techvidvan.com\/tutorials\/project-in-python-typing-speed-test\/#article","isPartOf":{"@id":"https:\/\/techvidvan.com\/tutorials\/project-in-python-typing-speed-test\/"},"author":{"name":"TechVidvan Team","@id":"https:\/\/techvidvan.com\/tutorials\/#\/schema\/person\/e9c26e74dd3d87421f7ada9433b8cd22"},"headline":"Python Project on Typing Speed Test &#8211; Build your first game in Python","datePublished":"2019-12-27T05:47:21+00:00","mainEntityOfPage":{"@id":"https:\/\/techvidvan.com\/tutorials\/project-in-python-typing-speed-test\/"},"wordCount":1065,"commentCount":0,"publisher":{"@id":"https:\/\/techvidvan.com\/tutorials\/#organization"},"image":{"@id":"https:\/\/techvidvan.com\/tutorials\/project-in-python-typing-speed-test\/#primaryimage"},"thumbnailUrl":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2019\/12\/project-in-python-on-typing-speed-test.jpg","keywords":["Project in Python","pygame library","Python project","python project example","Python project for practice","python project idea","typing speed game","Typing Speed Test"],"articleSection":["Python Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/techvidvan.com\/tutorials\/project-in-python-typing-speed-test\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/techvidvan.com\/tutorials\/project-in-python-typing-speed-test\/","url":"https:\/\/techvidvan.com\/tutorials\/project-in-python-typing-speed-test\/","name":"Python Project on Typing Speed Test - Build your first game in Python - TechVidvan","isPartOf":{"@id":"https:\/\/techvidvan.com\/tutorials\/#website"},"primaryImageOfPage":{"@id":"https:\/\/techvidvan.com\/tutorials\/project-in-python-typing-speed-test\/#primaryimage"},"image":{"@id":"https:\/\/techvidvan.com\/tutorials\/project-in-python-typing-speed-test\/#primaryimage"},"thumbnailUrl":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2019\/12\/project-in-python-on-typing-speed-test.jpg","datePublished":"2019-12-27T05:47:21+00:00","description":"Python project on wpm test - Learn to build an application using pygame library that will detect your typing speed and help you to improve it.","breadcrumb":{"@id":"https:\/\/techvidvan.com\/tutorials\/project-in-python-typing-speed-test\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/techvidvan.com\/tutorials\/project-in-python-typing-speed-test\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/techvidvan.com\/tutorials\/project-in-python-typing-speed-test\/#primaryimage","url":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2019\/12\/project-in-python-on-typing-speed-test.jpg","contentUrl":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2019\/12\/project-in-python-on-typing-speed-test.jpg","width":802,"height":420,"caption":"project in python on typing speed test"},{"@type":"BreadcrumbList","@id":"https:\/\/techvidvan.com\/tutorials\/project-in-python-typing-speed-test\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/techvidvan.com\/tutorials\/"},{"@type":"ListItem","position":2,"name":"Python Project on Typing Speed Test &#8211; Build your first game in Python"}]},{"@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\/74778","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=74778"}],"version-history":[{"count":0,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/posts\/74778\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/media\/74846"}],"wp:attachment":[{"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/media?parent=74778"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/categories?post=74778"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/tags?post=74778"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}