Skip to main content

Posts

Showing posts with the label tcs digital

TCS Xplore 2023 - PYTHON MCQ question for best practice ( iON Proctored Assessment )

                             Multiple Choice Question On PYTHON                                              Part - 01   Some Important Points :   -->   Developed by :  Guido van Rossum -->   Extesion : .py  -->   Case Sensitive  : yes  -->   Support : oops  yes  1.  Like the else, the elif statement is optional      a. True                             b. False  2.  Suppose s is “\t\tWorld\n”, what is s.strip() ?      a. World                          b. world       c. WORLD         ...

TCS Xplore 2023 Ion Proctored Exam ( IPA) 9 - JAVA coding solution ( 35 marks )

       Problem Statement : Create a class  Resort  and make attributes : int resortID; String resortName; String category; double rating; double price; Write  constructor and their getter and setter of all the attributes and make the attributes private . Write a Solution class and a main method inside it. Inside main method , create a method avgPriceOfGivenCategory . in this method you have to pass array object and one String input that will return integer value . we needs to check every object and if any object which has the category matched to string value taken by user and rating should be more than 4 then find then find the average price of the resorts .  It returns the average price and print it  and if  returns 0 and print "No any resort" . Input : 1001 abc resort 4 star 4.5 2000 1002 xyz resort 3 star 4.7 4000 1003 pqr resort 3 star 4.3 6000 1004 efg resort 3 star 4.9 5000 Code : import java . util .*; class Resort {   ...

TCS Xplore 2023 Ion Proctored Exam ( IPA) 8 - JAVA coding solution ( 35 marks )

     Problem Statement : Create a class Universities and make attributes : int UniversitiesID; String UniversitiesName; String Location; double rating; boolean InnovativeLab; Write getter and setter of all the attributes and make the attributes private . Write a Solution class and a main method inside it. Inside main method , create a method countNumberOfInnovativeLabs . in this method you have to pass array object and two inputs one is string and one is double value. and we needs to check that is location of each object must be equal to string value and rating must be greater that the double value that will be passed in method . and also check how many labs are present that accepting above condition . It returns the count of such labs and print it  and if no any labs , then returns 0 and print "No any Labs" . Input : Code :

TCS Xplore 2023 Ion Proctored Exam ( IPA) 6 - JAVA coding solution ( 35 marks )

 Problem Statement : Write a java program in which - 1. declare a class Beach and make attributes as -         int - BeachId , String - BeachName , String Location , String type , int rating ,int avg person come  and along with the constructor . All the attribute should be private and implement their  getter and setter . 2.  Write a Solution class with main method . where you have to implement a static method findLeastRating where you have to pass array object along with the String and an integer value which you have to take form user .( where String refers to location and int refers to number of person come ) 3. in findLeastRating method , you have to implement that if  location of any array object matches with the given String value of location and avg number of person come is greater than integer value that is taken from user then print the rating which is least one . and there is no any value get then it simply returns 0 and display on sc...

TCS Xplore 2023 Ion Proctored Exam ( IPA) 6 - JAVA coding solution ( 15 marks )

 Problem Statement :   Subscribe Please :   click here           Subscribe Please :   click here   Write a program to take a integer  number and check whether this number is perfect number or not . if number is perfect then print "Given number is Perfect number" else print  "Given number is not Perfect number". A number whose  sum of factors  (excluding the number itself) is equal to the number is called a  perfect   number . In other words, if the sum of positive divisors (excluding the number itself) of a number equals the number itself is called a  perfect number .                                           Subscribe Please :   click here   Example :  First, we find the factors of 496 i.e.  1, 2, 4, 8, 16, 31, 62, 124,  and  248 . Let's find the sum of f...

TCS Xplore 2023 Ion Proctored Exam ( IPA) 5 - JAVA coding solution ( 35 marks )

 Problem Statement :                               Subscribe Please :   click here Write a java program in which - 1. declare a class Vegetables and make attributes as -         int - vegetableId , String vegetableName , int price , int rating  and along with the constructor . All the attribute should be private and implement the getter and setter . 2.  Write a Solution class with main method . where you have to implement a static method findPrice where you have to pass array object along with the rating which you have to take form user . 3. in findPrice method , you have to implement that if the rating of vegetable is greather than the rating that user has given then return that vegetable object as output which has minimum rating or if no any vegetables are present which satisfy the above condition then simply print "No Match Found". 4. if it any return any object the...