{"id":11950,"date":"2022-08-27T11:00:00","date_gmt":"2022-08-27T05:30:00","guid":{"rendered":"https:\/\/blog.guvi.in\/?p=11950"},"modified":"2025-10-28T13:27:11","modified_gmt":"2025-10-28T07:57:11","slug":"tcs-xplore-python-coding-questions","status":"publish","type":"post","link":"https:\/\/www.guvi.in\/blog\/tcs-xplore-python-coding-questions\/","title":{"rendered":"Top 9 TCS Xplore Python Coding Questions [DeCode with HCL GUVI]"},"content":{"rendered":"\n<p><strong><em>TCS Xplore<\/em><\/strong>&nbsp;is a learner-centric program with a 120-hour progressive induction curriculum. Find the most important TCS Xplore Python Coding questions here. <\/p>\n\n\n\n<p>A tech career in India\u2019s IT trendsetter&nbsp;<strong>Tata Consultancy Services<\/strong>&nbsp;(TCS), is one of the top aspirations of most Indian techies. If you are still exploring TCS, let me tell you that TCS was India\u2019s first listed company to hit a $100 billion m-cap. So, rightly called the crown jewel of Indian IT.&nbsp;<\/p>\n\n\n\n<p>Whether you are a seasoned IT Expert or a beginner just trying to discover your identity on the ever-green IT planet, joining an Indian venture like TCS would open up unlimited opportunities.&nbsp;<\/p>\n\n\n\n<p>Xplore 1 and Xplore 2 both are self and pre-learning programs for TCS NINJA Fresher\u2019s 2019. All the TCS NINJA freshers are given the option to select either Xplore1 or Xplore2.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"1200\" height=\"432\" src=\"https:\/\/www.guvi.in\/blog\/wp-content\/uploads\/2022\/08\/TCS-Explore.png\" alt=\"TCS Xplore python coding questions\n\" class=\"wp-image-11995\" srcset=\"https:\/\/www.guvi.in\/blog\/wp-content\/uploads\/2022\/08\/TCS-Explore.png 1200w, https:\/\/www.guvi.in\/blog\/wp-content\/uploads\/2022\/08\/TCS-Explore-300x108.png 300w, https:\/\/www.guvi.in\/blog\/wp-content\/uploads\/2022\/08\/TCS-Explore-768x276.png 768w, https:\/\/www.guvi.in\/blog\/wp-content\/uploads\/2022\/08\/TCS-Explore-150x54.png 150w\" sizes=\"(max-width: 1200px) 100vw, 1200px\" title=\"\"><\/figure>\n\n\n\n<p>&nbsp;For your information, <\/p>\n\n\n\n<h2 class=\"wp-block-heading has-medium-font-size\"><strong>The <a href=\"https:\/\/www.guvi.in\/blog\/all-about-tcs-xplore\/\" target=\"_blank\" rel=\"noreferrer noopener\">TCS Xplore program<\/a><\/strong> <strong>is coupled with a plethora of engagements which include:<\/strong><\/h2>\n\n\n\n<ul>\n<li><strong>AsCEnD:<\/strong>&nbsp;This program will assist you in acing your Digital skills. You will also be certified and then can flaunt your competencies.<\/li>\n<\/ul>\n\n\n\n<ul>\n<li><strong>Hackathons:<\/strong>&nbsp;After mastering digital skills, you might look forward to testing the same. Then comes a fantastic platform to test your skills in the form of hackathons. You can showcase your prowess in Digital Technologies via hackathons.<\/li>\n<\/ul>\n\n\n\n<ul>\n<li><strong>Digital Connect Series:<\/strong>&nbsp;Get insights from leaders on the Organization\u2019s strategy for growth, current industry challenges and expectations from the customers<\/li>\n<\/ul>\n\n\n\n<ul>\n<li><strong>Business Unit Connect<\/strong>&nbsp;Business inclusive learning experience through quizzes, hackathons, Leader Connects etc.<\/li>\n<\/ul>\n\n\n\n<ul>\n<li><strong>Internships:<\/strong>&nbsp;Opportunity to learn and grow at one of the leading IT companies in the world.<\/li>\n<\/ul>\n\n\n\n<p>So, let us now quickly jump into the <\/p>\n\n\n\n<h2 class=\"wp-block-heading has-medium-font-size\"><strong>Top TCS Xplore Python coding questions &amp; answers:<\/strong><\/h2>\n\n\n\n<p><em>If you are aspiring to explore Python through a self-paced course, try HCL\u00a0GUVI\u2019s <a href=\"https:\/\/www.guvi.in\/courses\/programming\/python\/?utm_source=blog&amp;utm_medium=hyperlink&amp;utm_campaign=Top+9+TCS+Xplore+Python+Coding+Questions+%5BDeCode+with+GUVI%5D\" data-type=\"link\" data-id=\"https:\/\/www.guvi.in\/courses\/programming\/python\/?utm_source=blog&amp;utm_medium=organic&amp;utm_campaign=Top+9+TCS+Xplore+Python+Coding+Questions+%5BDeCode+with+GUVI%5D\" target=\"_blank\" rel=\"noreferrer noopener\"><strong>Python certification course with IIT Certification.<\/strong><\/a><\/em><\/p>\n\n\n\n<h3 class=\"wp-block-heading has-medium-font-size\"><strong>Q1. Write a <a href=\"https:\/\/www.guvi.in\/hub\/python\/\" target=\"_blank\" rel=\"noreferrer noopener\">Python<\/a> code to print the position or index of a given string (taken as input from a user) from a given list of strings.<\/strong><\/h3>\n\n\n\n<p>Ans. The program will take input from the user in the form of a string and will pass the string as an argument to a function. The function will take the strings as arguments and return the Position(or index) of the list if the passed string is present in the list, else it&#8217;ll return &#8220;String not found&#8221;. If the passed strings are present at multiple indices, in that case, the function should only return The first index of occurrence. <\/p>\n\n\n\n<p>Considering the above scenario into account, build the logic to print the position of the passed string from a given list of strings.<\/p>\n\n\n\n<p>Refer to the below instructions and sample input-Output for more clarity on the requirement.<\/p>\n\n\n\n<p><strong><em>Input:<\/em><\/strong><\/p>\n\n\n\n<p>4<\/p>\n\n\n\n<p>Hello Good Morning<\/p>\n\n\n\n<p>abcd123Fghy<\/p>\n\n\n\n<p>India<\/p>\n\n\n\n<p>Progoti.c<\/p>\n\n\n\n<p>India<\/p>\n\n\n\n<p><strong><em>Output:<\/em><\/strong><\/p>\n\n\n\n<div class=\"wp-block-group has-background is-layout-flow wp-block-group-is-layout-flow\" style=\"background-color:#ebebeb\"><div class=\"wp-block-group__inner-container\">\n<p>The position of the searched string is: 2<\/p>\n\n\n\n<p>def isPresent(lis,st):<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;for i in range(0, len(lis)):<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if lis[i] == st:<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return i<\/p>\n\n\n\n<p>lis = []<\/p>\n\n\n\n<p>for j in range(int(input())):<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;lis.append(input())<\/p>\n\n\n\n<p>st = input()<\/p>\n\n\n\n<p>ind = isPresent(lis,st)<\/p>\n\n\n\n<p>if ind == -1:<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;print(&#8220;String not found&#8221;)<\/p>\n\n\n\n<p>else:<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;print(&#8220;Position of the searched string is: &#8220;,ind)<\/p>\n<\/div><\/div>\n\n\n\n<h3 class=\"wp-block-heading has-medium-font-size\"><strong>Q2. Make a function check_palindrome() that takes a list of<\/strong> <strong>strings as an argument. It returns the string which is a palindrome.<\/strong><\/h3>\n\n\n\n<p><strong><em>Input:<\/em><\/strong><\/p>\n\n\n\n<p>3<\/p>\n\n\n\n<p>malayalam<\/p>\n\n\n\n<p>radar<\/p>\n\n\n\n<p>nitish<\/p>\n\n\n\n<p><strong><em>Output:<\/em><\/strong><\/p>\n\n\n\n<div class=\"wp-block-group has-background is-layout-flow wp-block-group-is-layout-flow\" style=\"background-color:#ebebeb\"><div class=\"wp-block-group__inner-container\">\n<p>malayalam<\/p>\n\n\n\n<p>radar<\/p>\n\n\n\n<p>code:<\/p>\n\n\n\n<p>def check_palindrome(lis):<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;palin_lis = []<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;for i in lis:<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if i == i[::-1]:<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;palin_lis.append(i)<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;return palin_lis<\/p>\n\n\n\n<p>lis = []<\/p>\n\n\n\n<p>for i in range(int(input())):<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;lis.append(input())<\/p>\n\n\n\n<p>for _ in check_palindrome(lis):<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;print(_)<\/p>\n<\/div><\/div>\n\n\n\n<h3 class=\"wp-block-heading has-medium-font-size\"><strong>Q3. Create a function count_words() which takes a string as input and creates a dictionary with a word in the string as a key and its value as the number of times the word is repeated in the string. It should return the dictionary.<\/strong><\/h3>\n\n\n\n<h3 class=\"wp-block-heading has-medium-font-size\"><strong>eg: &#8220;hello hi hello world hello&#8221;&nbsp;<\/strong><\/h3>\n\n\n\n<h3 class=\"wp-block-heading has-medium-font-size\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<strong>&nbsp;&nbsp;dict={&#8216;hello&#8217;:3,&#8217;hi&#8217;:1,&#8217;word&#8217;:1}<\/strong><\/h3>\n\n\n\n<p>Create another function max_accurance_word() which takes a string as input and returns the word which is occurring a maximum number of times in the string. Use the count_words function inside this function.<\/p>\n\n\n\n<p><strong><em>Sample input:<\/em><\/strong><\/p>\n\n\n\n<p>&#8220;hello hi hello world hello&#8221; <\/p>\n\n\n\n<p><strong><em>Sample output:<\/em><\/strong><\/p>\n\n\n\n<div class=\"wp-block-group has-background is-layout-flow wp-block-group-is-layout-flow\" style=\"background-color:#ebebeb\"><div class=\"wp-block-group__inner-container\">\n<p>&#8216;hello&#8217;<\/p>\n\n\n\n<p>Code:<\/p>\n\n\n\n<p>def count_words(string):<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;l=string.split()<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;s=set(l)<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;d={}<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;for i in s:<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;x=l.count(i)<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;d[i]=x<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;return d<\/p>\n\n\n\n<p>def max_occurance(string):<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;d=count_words(string)<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;l1=[]<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;for i in d.values():<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;l1.append(i)<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;max1=max(l1)<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;for i in d.keys():<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if d[i]==max1:<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return i<\/p>\n\n\n\n<p>string=input()&nbsp;<\/p>\n\n\n\n<p>print(max_occurance(string))<\/p>\n<\/div><\/div>\n\n\n\n<h3 class=\"wp-block-heading has-medium-font-size\"><strong>Q4. Write a Python program to create a class called mobile which contains a method called display that displays the name of the mobile owner, mobile brand, colour and camera pixel.<\/strong><\/h3>\n\n\n\n<p><strong><em>Input Format:<\/em><\/strong><\/p>\n\n\n\n<p>String =&gt; name<\/p>\n\n\n\n<p>String =&gt; brand name<\/p>\n\n\n\n<p>String =&gt; color<\/p>\n\n\n\n<p>Integer =&gt; pixel<\/p>\n\n\n\n<p><strong><em>Output Format:<\/em><\/strong><\/p>\n\n\n\n<p class=\"has-background\" style=\"background-color:#ebebeb\">Output is a String<\/p>\n\n\n\n<p><strong><em>Sample Input:<\/em><\/strong><\/p>\n\n\n\n<p>Dinesh<\/p>\n\n\n\n<p>Lenovo vibe K5 note<\/p>\n\n\n\n<p>gold<\/p>\n\n\n\n<p>13<\/p>\n\n\n\n<p><strong><em>Sample Output:<\/em><\/strong><\/p>\n\n\n\n<div class=\"wp-block-group has-background is-layout-flow wp-block-group-is-layout-flow\" style=\"background-color:#ebebeb\"><div class=\"wp-block-group__inner-container\">\n<p>Dinesh&#8217;s own Lenovo vibe K5 note gold colour smartphone has a 13 MP camera<\/p>\n\n\n\n<p>Case 1<\/p>\n\n\n\n<p>Case 2<\/p>\n<\/div><\/div>\n\n\n\n<p><strong><em>Input (stdin)<\/em><\/strong><\/p>\n\n\n\n<p>Dinesh<\/p>\n\n\n\n<p>Lenovo vibe K5 note<\/p>\n\n\n\n<p>gold<\/p>\n\n\n\n<p>13<\/p>\n\n\n\n<p><strong><em>Output (stdout)<\/em><\/strong><\/p>\n\n\n\n<p class=\"has-background\" style=\"background-color:#ebebeb\">Dinesh&#8217;s own Lenovo vibe K5 note gold colour smartphone has a 13 MP camera<\/p>\n\n\n\n<p><strong><em>Input (stdin)<\/em><\/strong><\/p>\n\n\n\n<p>Manoj<\/p>\n\n\n\n<p>Vivo v11<\/p>\n\n\n\n<p>white<\/p>\n\n\n\n<p>21<\/p>\n\n\n\n<p><strong><em>Output (stdout)<\/em><\/strong><\/p>\n\n\n\n<div class=\"wp-block-group has-background is-layout-flow wp-block-group-is-layout-flow\" style=\"background-color:#ebebeb\"><div class=\"wp-block-group__inner-container\">\n<p>Manoj own Vivo v11 white colour smartphone having a 21 MP camera<\/p>\n\n\n\n<p>Code:<\/p>\n\n\n\n<p>class mobile:<\/p>\n\n\n\n<p>&nbsp;&nbsp;def __init__(self,owner,brand,color,camera):<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;self.owner = owner<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;self.brand = brand&nbsp;<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;self.color = color&nbsp;<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;self.camera = camera<\/p>\n\n\n\n<p>&nbsp;&nbsp;def display(self):<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;print(&#8220;{owner} own {brand} {color} color smartphone having {camera} MP camera&#8221;.format(owner = self.owner,brand = self.brand,color = self.color,camera = self.camera))<\/p>\n\n\n\n<p>a= input()<\/p>\n\n\n\n<p>b= input()<\/p>\n\n\n\n<p>c= input()<\/p>\n\n\n\n<p>d= input()<\/p>\n\n\n\n<p>obj = mobile(a,b,c,d)<\/p>\n\n\n\n<p>obj.display()<\/p>\n<\/div><\/div>\n\n\n\n<p><strong>Read out everything Python and beyond here: <a href=\"https:\/\/www.guvi.in\/blog\/?s=Python\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/www.guvi.in\/blog\/?s=Python<\/a><\/strong><\/p>\n\n\n\n<h3 class=\"wp-block-heading has-medium-font-size\"><strong>Q5. Write a Python program to calculate the salary of the temporary staff using Multilevel Inheritance.<\/strong><\/h3>\n\n\n\n<p><strong>Description:<\/strong><\/p>\n\n\n\n<p>Create a class Person which contains a constructor __init__() and a method display(self). The method displays the name of the person<\/p>\n\n\n\n<p>Create another class Staff which inherits Person. It contains a constructor __init__() and a method display(self). The method displays Id.<\/p>\n\n\n\n<p>Create another class Temporarystaff which inherits Staff, it also contains a constructor __init__() and two method displays (self), and Salary(self).<\/p>\n\n\n\n<p>The method Salary(self) returns the total salary earned. The method display(self) displays a number of days, hours worked and total salary earned.<\/p>\n\n\n\n<p>salary earned = total hours worked *150<\/p>\n\n\n\n<p><strong><em>Input Format:<\/em><\/strong><\/p>\n\n\n\n<p>String =&gt; name<\/p>\n\n\n\n<p>Integer =&gt; Id<\/p>\n\n\n\n<p>Integer =&gt; number of days<\/p>\n\n\n\n<p>Integer =&gt; hoursworked<\/p>\n\n\n\n<p><strong><em>Output Format:<\/em><\/strong><\/p>\n\n\n\n<p class=\"has-background\" style=\"background-color:#ebebeb\">All outputs contain strings and integers.<\/p>\n\n\n\n<p>Sample Input:<\/p>\n\n\n\n<p>Tilak<\/p>\n\n\n\n<p>157934<\/p>\n\n\n\n<p>20<\/p>\n\n\n\n<p>8<\/p>\n\n\n\n<p><strong><em>Sample Output:<\/em><\/strong><\/p>\n\n\n\n<div class=\"wp-block-group has-background is-layout-flow wp-block-group-is-layout-flow\" style=\"background-color:#ebebeb\"><div class=\"wp-block-group__inner-container\">\n<p>Name of Person = Tilak<\/p>\n\n\n\n<p>Staff Id is = 157934<\/p>\n\n\n\n<p>No. of Days = 20<\/p>\n\n\n\n<p>No. of Hours Worked = 8<\/p>\n\n\n\n<p>Total Salary = 24000<\/p>\n\n\n\n<p>Case 1<\/p>\n\n\n\n<p>Case 2<\/p>\n<\/div><\/div>\n\n\n\n<p><strong><em>Input (stdin)<\/em><\/strong><\/p>\n\n\n\n<p>Tilak<\/p>\n\n\n\n<p>157934<\/p>\n\n\n\n<p>20<\/p>\n\n\n\n<p>8<\/p>\n\n\n\n<p><strong><em>Output (stdout)<\/em><\/strong><\/p>\n\n\n\n<div class=\"wp-block-group has-background is-layout-flow wp-block-group-is-layout-flow\" style=\"background-color:#ebebeb\"><div class=\"wp-block-group__inner-container\">\n<p>Name of Person = Tilak<\/p>\n\n\n\n<p>Staff Id is&nbsp; = 157934<\/p>\n\n\n\n<p>No. of Days = 20<\/p>\n\n\n\n<p>No. of Hours Worked = 8<\/p>\n\n\n\n<p>Total Salary = 24000<\/p>\n<\/div><\/div>\n\n\n\n<p><strong><em>Input (stdin)<\/em><\/strong><\/p>\n\n\n\n<p>Praveen<\/p>\n\n\n\n<p>124563<\/p>\n\n\n\n<p>26<\/p>\n\n\n\n<p>6<\/p>\n\n\n\n<p><strong><em>Output (stdout)<\/em><\/strong><\/p>\n\n\n\n<div class=\"wp-block-group has-background is-layout-flow wp-block-group-is-layout-flow\" style=\"background-color:#ebebeb\"><div class=\"wp-block-group__inner-container\">\n<p>Name of Person = Praveen<\/p>\n\n\n\n<p>Staff Id is&nbsp; = 124563<\/p>\n\n\n\n<p>No. of Days = 26<\/p>\n\n\n\n<p>No. of Hours Worked = 6<\/p>\n\n\n\n<p>Total Salary = 23400<\/p>\n\n\n\n<p>Code:<\/p>\n\n\n\n<p>class employee:<\/p>\n\n\n\n<p>&nbsp;&nbsp;def __init__(self,name,id,days,hours):<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;self.name = name<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;self.id = id<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;self.days = days<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;self.hours = hours<\/p>\n\n\n\n<p>&nbsp;&nbsp;def display(self):<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;print(&#8220;Name of Person = {name}\\nStaff Id is&nbsp; = {id}\\nNo. of Days = {days}\\nNo. of Hours Worked = {hours}\\nTotal Salary = {salary}&#8221;.format(name=self.name,id=self.id,days=self.days,hours=self.hours,salary=self.days*self.hours*150))<\/p>\n\n\n\n<p>a = input()<\/p>\n\n\n\n<p>b = int(input())<\/p>\n\n\n\n<p>c = int(input())<\/p>\n\n\n\n<p>d = int(input())<\/p>\n\n\n\n<p>obj = employee(a,b,c,d)<\/p>\n\n\n\n<p>obj.display()<\/p>\n<\/div><\/div>\n\n\n\n<h3 class=\"wp-block-heading has-medium-font-size\"><strong>Q6. Write a Python program to check the quantity of petrol in the bike using exception handling.<\/strong><\/h3>\n\n\n\n<p>If there is no petrol i.e. null in the bike it should raise an exception. That exception is handled by using except block and it should print &#8220;There is no fuel in the bike&#8221;. Otherwise, it should the show quantity of petrol on the bike.&nbsp;<\/p>\n\n\n\n<p><strong><em>Input Format:<\/em><\/strong><\/p>\n\n\n\n<p>The input consists of a string which denotes a fuel.<\/p>\n\n\n\n<p><strong><em>Output Format:<\/em><\/strong><\/p>\n\n\n\n<p class=\"has-background\" style=\"background-color:#ebebeb\">Output is a String<\/p>\n\n\n\n<p><strong><em>Sample Input:<\/em><\/strong><\/p>\n\n\n\n<p>40<\/p>\n\n\n\n<p><strong><em>Sample Output:<\/em><\/strong><\/p>\n\n\n\n<div class=\"wp-block-group has-ast-global-color-4-background-color has-background is-layout-flow wp-block-group-is-layout-flow\"><div class=\"wp-block-group__inner-container\">\n<p>Petrol Quantity = 40<\/p>\n\n\n\n<p>Case 1<\/p>\n\n\n\n<p>Case 2<\/p>\n<\/div><\/div>\n\n\n\n<p><strong><em>Input (stdin)<\/em><\/strong><\/p>\n\n\n\n<p>40<\/p>\n\n\n\n<p><strong><em>Output (stdout)<\/em><\/strong><\/p>\n\n\n\n<p>Petrol Quantity =&nbsp; 40<\/p>\n\n\n\n<p><strong><em>Input (stdin)<\/em><\/strong><\/p>\n\n\n\n<p>NulL<\/p>\n\n\n\n<p><strong><em>Output (stdout)<\/em><\/strong><\/p>\n\n\n\n<div class=\"wp-block-group has-ast-global-color-4-background-color has-background is-layout-flow wp-block-group-is-layout-flow\"><div class=\"wp-block-group__inner-container\">\n<p>There is no fuel in the Bike<\/p>\n\n\n\n<p>Code:<\/p>\n\n\n\n<p>a=input()<\/p>\n\n\n\n<p>try:<\/p>\n\n\n\n<p>&nbsp;&nbsp;if(a.lower()!=&#8217;null&#8217;):<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;print(&#8220;Petrol Quantity = &#8220;,a)<\/p>\n\n\n\n<p>&nbsp;&nbsp;else:<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;raise ValueError<\/p>\n\n\n\n<p>except(ValueError) :<\/p>\n\n\n\n<p>&nbsp;&nbsp;print(&#8220;There is no fuel in the Bike&#8221;)<\/p>\n<\/div><\/div>\n\n\n\n<p><strong>Some more TCS Xplore Python coding questions &amp; answers:<\/strong><\/p>\n\n\n\n<h3 class=\"wp-block-heading has-medium-font-size\"><strong>Q7.Write a Python program to display the Passport details of the Person using composition.<\/strong><\/h3>\n\n\n\n<p><strong><em>Description:<\/em><\/strong><\/p>\n\n\n\n<p>Create a class Passport and class Person. Compose the class Passport in the class Person.<\/p>\n\n\n\n<p>Class Passport contains constructor __init__() which sets the name, address and passport no.<\/p>\n\n\n\n<p>Display the name of the person, Address and passport number of the person.&nbsp;<\/p>\n\n\n\n<p><strong><em>Input Format:<\/em><\/strong><\/p>\n\n\n\n<p>Name =&gt; String<\/p>\n\n\n\n<p>Address =&gt; String<\/p>\n\n\n\n<p>passport number =&gt; String<\/p>\n\n\n\n<p><strong><em>Output Format:<\/em><\/strong><\/p>\n\n\n\n<p class=\"has-ast-global-color-4-background-color has-background\">Three outputs. All are String<\/p>\n\n\n\n<p><strong><em>Sample Input:<\/em><\/strong><\/p>\n\n\n\n<p>RamKumar<\/p>\n\n\n\n<p>Kollam<\/p>\n\n\n\n<p>J7546891<\/p>\n\n\n\n<p><strong><em>Sample Output:<\/em><\/strong><\/p>\n\n\n\n<div class=\"wp-block-group has-ast-global-color-4-background-color has-background is-layout-flow wp-block-group-is-layout-flow\"><div class=\"wp-block-group__inner-container\">\n<p>Name: RamKumar<\/p>\n\n\n\n<p>Address: Kollam<\/p>\n\n\n\n<p>Passport Number: J7546891<\/p>\n\n\n\n<p>Case 1<\/p>\n\n\n\n<p>Case 2<\/p>\n<\/div><\/div>\n\n\n\n<p><strong><em>Input (stdin)<\/em><\/strong><\/p>\n\n\n\n<p>RamKumar<\/p>\n\n\n\n<p>Kollam<\/p>\n\n\n\n<p>J7546891<\/p>\n\n\n\n<p><strong><em>Output (stdout)<\/em><\/strong><\/p>\n\n\n\n<div class=\"wp-block-group has-ast-global-color-4-background-color has-background is-layout-flow wp-block-group-is-layout-flow\"><div class=\"wp-block-group__inner-container\">\n<p>Name: RamKumar<\/p>\n\n\n\n<p>Address: Kollam<\/p>\n\n\n\n<p>Passport Number: J7546891<\/p>\n<\/div><\/div>\n\n\n\n<p><strong><em>Input (stdin)<\/em><\/strong><\/p>\n\n\n\n<p>Purushothaman<\/p>\n\n\n\n<p>Mumbai<\/p>\n\n\n\n<p>J1535231<\/p>\n\n\n\n<p><strong><em>Output (stdout)<\/em><\/strong><\/p>\n\n\n\n<div class=\"wp-block-group has-ast-global-color-4-background-color has-background is-layout-flow wp-block-group-is-layout-flow\"><div class=\"wp-block-group__inner-container\">\n<p>Name: Purushothaman<\/p>\n\n\n\n<p>Address: Mumbai<\/p>\n\n\n\n<p>Passport Number: J1535231<\/p>\n<\/div><\/div>\n\n\n\n<p><strong><em>Code:<\/em><\/strong><\/p>\n\n\n\n<p>#Type your code here&#8230;<\/p>\n\n\n\n<div class=\"wp-block-group has-ast-global-color-4-background-color has-background is-layout-flow wp-block-group-is-layout-flow\"><div class=\"wp-block-group__inner-container\">\n<p>class passport:<\/p>\n\n\n\n<p>&nbsp;&nbsp;def __init__(self,name,address,pa):<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;self.name=name<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;self.address=address<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;self.pa=pa<\/p>\n\n\n\n<p>&nbsp;&nbsp;def display(self):<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;print(&#8220;Name :&#8221;,self.name)<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;print(&#8220;Address :&#8221;,self.address)<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;print(&#8220;Passport Number :&#8221;,self.pa)<\/p>\n\n\n\n<p>class person(passport):<\/p>\n\n\n\n<p>&nbsp;&nbsp;def __init__(self,name,address,pa):<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;super().__init__(name,address,pa)<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;super().display()<\/p>\n\n\n\n<p>a=input()<\/p>\n\n\n\n<p>b=input()<\/p>\n\n\n\n<p>c=input()<\/p>\n\n\n\n<p>e1=person(a,b,c)<\/p>\n<\/div><\/div>\n\n\n\n<p><strong>Prepare  to crack the <a href=\"https:\/\/www.guvi.in\/blog\/all-about-tcs-xplore\/\" target=\"_blank\" rel=\"noreferrer noopener\">TCS Xplore<\/a> Python Coding questions with HCL GUVI: <a href=\"https:\/\/www.guvi.in\/courses\/programming\/python\/\" data-type=\"link\" data-id=\"https:\/\/www.guvi.in\/courses\/programming\/python\/\" target=\"_blank\" rel=\"noreferrer noopener\">Python Course with IIT Certification<\/a><\/strong><\/p>\n\n\n\n<h3 class=\"wp-block-heading has-medium-font-size\"><strong>Q8. Longest Increasing Subsequence<\/strong><\/h3>\n\n\n\n<p>Given an integer array &#8216;A&#8217;. Find the length of its Longest Increasing Subsequence of a sub-array from the given integer array. The elements are sorted in monotonic increasing order. You need to create a function that takes two inputs &#8211; integer &#8216;n&#8217; and an integer array containing &#8216;n&#8217; integers. To return the length of its LIS.<\/p>\n\n\n\n<p>Format:<\/p>\n\n\n\n<p><strong><em>Input:<\/em><\/strong><\/p>\n\n\n\n<p>The integer input is &#8216;n&#8217;. And Integer array &#8216;A&#8217; input, contains &#8216;n&#8217; integers.<\/p>\n\n\n\n<p><strong><em>Output:<\/em><\/strong><\/p>\n\n\n\n<div class=\"wp-block-group has-ast-global-color-4-background-color has-background is-layout-flow wp-block-group-is-layout-flow\"><div class=\"wp-block-group__inner-container\">\n<p>Return the length of its LIS.<\/p>\n\n\n\n<p>Constraint:<\/p>\n\n\n\n<p>1 &lt;= input1 &lt;= 1000<\/p>\n<\/div><\/div>\n\n\n\n<p><strong><em>Example:<\/em><\/strong><\/p>\n\n\n\n<p><strong><em>Input:<\/em><\/strong><\/p>\n\n\n\n<p>3<\/p>\n\n\n\n<p>1, 3, 2<\/p>\n\n\n\n<p><strong><em>Output:<\/em><\/strong><\/p>\n\n\n\n<p class=\"has-ast-global-color-4-background-color has-background\">2<\/p>\n\n\n\n<p>Case 1<\/p>\n\n\n\n<p>Case 2<\/p>\n\n\n\n<p><strong><em>Input (stdin)<\/em><\/strong><\/p>\n\n\n\n<p>3<\/p>\n\n\n\n<p>1 3 2<\/p>\n\n\n\n<p><strong><em>Output (stdout)<\/em><\/strong><\/p>\n\n\n\n<p>2<\/p>\n\n\n\n<p><strong><em>Input (stdin)<\/em><\/strong><\/p>\n\n\n\n<p>9<\/p>\n\n\n\n<p>10 22 9 33 21 50 41 60 80<\/p>\n\n\n\n<p><strong><em>Output (stdout)<\/em><\/strong><\/p>\n\n\n\n<p class=\"has-ast-global-color-4-background-color has-background\">6<\/p>\n\n\n\n<p>Code:<\/p>\n\n\n\n<div class=\"wp-block-group has-ast-global-color-4-background-color has-background is-layout-flow wp-block-group-is-layout-flow\"><div class=\"wp-block-group__inner-container\">\n<p>def lis(arr,n):<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;lis = [1]*n<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;for i in range (1, n):<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;for j in range(0 , i):<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if arr[i] &gt; arr[j] and lis[i]&lt; lis[j] + 1 :<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;lis[i] = lis[j]+1<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;maximum = 0<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;for i in range(n):<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;maximum = max(maximum , lis[i])<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;return maximum<\/p>\n\n\n\n<p>n=int(input())<\/p>\n\n\n\n<p>arr = []<\/p>\n\n\n\n<p>arr=list(map(int, input().split(&#8216; &#8216;)[:n]))<\/p>\n\n\n\n<p>print(lis(arr,n))<\/p>\n<\/div><\/div>\n\n\n\n<p>The next coding question from the list of TCS Xplore Python coding questions is here:<\/p>\n\n\n\n<h3 class=\"wp-block-heading has-medium-font-size\"><strong>Q9. Consider a row of n coins. We play a game against an opponent by alternative turns. In each turn, a player selects either the first or last coin from the row. Now remove it from the row permanently and take the value of a coin. Find the maximum possible amount of money.<\/strong><\/h3>\n\n\n\n<p><strong><em>Example:<\/em><\/strong><\/p>\n\n\n\n<p><strong><em>Input:<\/em><\/strong><\/p>\n\n\n\n<p>4<\/p>\n\n\n\n<p>5 3 7 10<\/p>\n\n\n\n<p><strong><em>Output:<\/em><\/strong><\/p>\n\n\n\n<div class=\"wp-block-group has-ast-global-color-4-background-color has-background is-layout-flow wp-block-group-is-layout-flow\"><div class=\"wp-block-group__inner-container\">\n<p>15<\/p>\n\n\n\n<p>Case 1<\/p>\n\n\n\n<p>Case 2<\/p>\n\n\n\n<p>Case 3<\/p>\n\n\n\n<p>Case 6<\/p>\n\n\n\n<p>Case 7<\/p>\n\n\n\n<p>Case 8<\/p>\n\n\n\n<p>Case 9<\/p>\n\n\n\n<p>Case 10<\/p>\n<\/div><\/div>\n\n\n\n<p><strong><em>Input (stdin)<\/em><\/strong><\/p>\n\n\n\n<p>4<\/p>\n\n\n\n<p>5 3 7 10<\/p>\n\n\n\n<p><strong><em>Output (stdout)<\/em><\/strong><\/p>\n\n\n\n<p class=\"has-ast-global-color-4-background-color has-background\">15<\/p>\n\n\n\n<p><strong><em>Input (stdin)<\/em><\/strong><\/p>\n\n\n\n<p>7<\/p>\n\n\n\n<p>8 15 3 7 10 22 5<\/p>\n\n\n\n<p><strong><em>Output (stdout)<\/em><\/strong><\/p>\n\n\n\n<p class=\"has-ast-global-color-4-background-color has-background\">26<\/p>\n\n\n\n<p><strong><em>Input (stdin)<\/em><\/strong><\/p>\n\n\n\n<p>8<\/p>\n\n\n\n<p>10 3 8 2 6 7 15 1<\/p>\n\n\n\n<p><strong><em>Output (stdout)<\/em><\/strong><\/p>\n\n\n\n<p class=\"has-ast-global-color-4-background-color has-background\">39<\/p>\n\n\n\n<p><strong><em>Input (stdin)<\/em><\/strong><\/p>\n\n\n\n<p>5<\/p>\n\n\n\n<p>1 2 3 4 5<\/p>\n\n\n\n<p><strong><em>Output (stdout)<\/em><\/strong><\/p>\n\n\n\n<p class=\"has-ast-global-color-4-background-color has-background\">9<\/p>\n\n\n\n<p><strong><em>Input (stdin)<\/em><\/strong><\/p>\n\n\n\n<p>7<\/p>\n\n\n\n<p>11 22 33 44 55 66 88<\/p>\n\n\n\n<p><strong><em>Output (stdout)<\/em><\/strong><\/p>\n\n\n\n<p class=\"has-ast-global-color-4-background-color has-background\">187<\/p>\n\n\n\n<p><strong><em>Code:<\/em><\/strong><\/p>\n\n\n\n<p><\/p>\n\n\n\n<div class=\"wp-block-group has-ast-global-color-4-background-color has-background is-layout-flow wp-block-group-is-layout-flow\"><div class=\"wp-block-group__inner-container\">\n<p>def optimalStrategyOfGame(arr, n):<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;table = [[0 for i in range(n)]<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;for i in range(n)]<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;for gap in range(n):<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;for j in range(gap, n):<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;i = j &#8211; gap<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;x = 0<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if((i + 2) &lt;= j):<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;x = table[i + 2][j]<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;y = 0<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if((i + 1) &lt;= (j &#8211; 1)):<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;y = table[i + 1][j &#8211; 1]<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;z = 0<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if(i &lt;= (j &#8211; 2)):<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;z = table[i][j &#8211; 2]<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;table[i][j] = max(arr[i] + min(x, y),<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;arr[j] + min(y, z))<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;return table[0][n &#8211; 1]<\/p>\n\n\n\n<p>n=int(input())<\/p>\n\n\n\n<p>arr1 = [int(i) for i in input().split()]&nbsp;<\/p>\n\n\n\n<p>print(optimalStrategyOfGame(arr1, n))<\/p>\n\n\n\n<p><\/p>\n<\/div><\/div>\n\n\n\n<h2 class=\"wp-block-heading has-medium-font-size\"><strong>Wrapping Up <\/strong><\/h2>\n\n\n\n<p>So, these are the top TCS Xplore Python Coding Questions &amp; Answers for you. If you have any questions that you think are important and not included here, kindly share them below in the comment section. This place for knowledge sharing is trending as the next best destination for learning Technology. <\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/www.guvi.in\/\"><img decoding=\"async\" width=\"1200\" height=\"542\" src=\"https:\/\/www.guvi.in\/blog\/wp-content\/uploads\/2022\/08\/guvi-page-1200x542.png\" alt=\"TCS XPLORE, GUVI\n\" class=\"wp-image-11997\" srcset=\"https:\/\/www.guvi.in\/blog\/wp-content\/uploads\/2022\/08\/guvi-page-1200x542.png 1200w, https:\/\/www.guvi.in\/blog\/wp-content\/uploads\/2022\/08\/guvi-page-300x135.png 300w, https:\/\/www.guvi.in\/blog\/wp-content\/uploads\/2022\/08\/guvi-page-768x347.png 768w, https:\/\/www.guvi.in\/blog\/wp-content\/uploads\/2022\/08\/guvi-page-1536x694.png 1536w, https:\/\/www.guvi.in\/blog\/wp-content\/uploads\/2022\/08\/guvi-page-150x68.png 150w, https:\/\/www.guvi.in\/blog\/wp-content\/uploads\/2022\/08\/guvi-page.png 1882w\" sizes=\"(max-width: 1200px) 100vw, 1200px\" title=\"\"><\/a><\/figure>\n\n\n\n<p>Articles similar to TCS Xplore Python Coding Questions &amp; Answers:<\/p>\n\n\n\n<p><a href=\"https:\/\/www.guvi.in\/blog\/postman-interview-questions\/\" target=\"_blank\" data-type=\"post\" data-id=\"11799\" rel=\"noreferrer noopener\">Top Postman Interview Questions<\/a><\/p>\n\n\n\n<p><a href=\"https:\/\/www.guvi.in\/blog\/top-5-cred-interview-questions-for-sde-role\/\" target=\"_blank\" data-type=\"link\" data-id=\"https:\/\/www.guvi.in\/blog\/top-5-cred-interview-questions-for-sde-role\/\" rel=\"noreferrer noopener\">CRED Interview Questions<\/a><\/p>\n\n\n\n<p><a href=\"https:\/\/www.guvi.in\/blog\/tips-tricks-to-crack-data-science-interviews\/\" target=\"_blank\" data-type=\"post\" data-id=\"11632\" rel=\"noreferrer noopener\">Interview Questions<\/a><\/p>\n\n\n\n<p><em>If you are aspiring to explore Python through a self-paced course, try\u00a0HCL GUVI\u2019s <a href=\"https:\/\/www.guvi.in\/courses\/programming\/python\/?utm_source=blog&amp;utm_medium=hyperlink&amp;utm_campaign=Top+9+TCS+Xplore+Python+Coding+Questions+%5BDeCode+with+GUVI%5D\" data-type=\"link\" data-id=\"https:\/\/www.guvi.in\/courses\/programming\/python\/?utm_source=blog&amp;utm_medium=organic&amp;utm_campaign=Top+9+TCS+Xplore+Python+Coding+Questions+%5BDeCode+with+GUVI%5D\" target=\"_blank\" rel=\"noreferrer noopener\"><strong>Python certification course with IIT Certification.<\/strong><\/a><\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>TCS Xplore&nbsp;is a learner-centric program with a 120-hour progressive induction curriculum. Find the most important TCS Xplore Python Coding questions here. A tech career in India\u2019s IT trendsetter&nbsp;Tata Consultancy Services&nbsp;(TCS), is one of the top aspirations of most Indian techies. If you are still exploring TCS, let me tell you that TCS was India\u2019s first [&hellip;]<\/p>\n","protected":false},"author":9,"featured_media":11999,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[719,13],"tags":[],"views":"59457","authorinfo":{"name":"Archana","url":"https:\/\/www.guvi.in\/blog\/author\/archana\/"},"thumbnailURL":"https:\/\/www.guvi.in\/blog\/wp-content\/uploads\/2022\/08\/6.-TCS-Xplore-Python-Coding-Questions-300x157.png","jetpack_featured_media_url":"https:\/\/www.guvi.in\/blog\/wp-content\/uploads\/2022\/08\/6.-TCS-Xplore-Python-Coding-Questions.png","_links":{"self":[{"href":"https:\/\/www.guvi.in\/blog\/wp-json\/wp\/v2\/posts\/11950"}],"collection":[{"href":"https:\/\/www.guvi.in\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.guvi.in\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.guvi.in\/blog\/wp-json\/wp\/v2\/users\/9"}],"replies":[{"embeddable":true,"href":"https:\/\/www.guvi.in\/blog\/wp-json\/wp\/v2\/comments?post=11950"}],"version-history":[{"count":19,"href":"https:\/\/www.guvi.in\/blog\/wp-json\/wp\/v2\/posts\/11950\/revisions"}],"predecessor-version":[{"id":91481,"href":"https:\/\/www.guvi.in\/blog\/wp-json\/wp\/v2\/posts\/11950\/revisions\/91481"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.guvi.in\/blog\/wp-json\/wp\/v2\/media\/11999"}],"wp:attachment":[{"href":"https:\/\/www.guvi.in\/blog\/wp-json\/wp\/v2\/media?parent=11950"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.guvi.in\/blog\/wp-json\/wp\/v2\/categories?post=11950"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.guvi.in\/blog\/wp-json\/wp\/v2\/tags?post=11950"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}