Friday 22 May 2020

TCS Xplore Software Foundation SQL Final Assessment

SQL Final Assessment

Q1. Which SQL statement returns a numeric value?

Answer: SELECT sysdate-hire_date FROM EMP;

Q2. Which of the following is true with respect to Referential integrity ?

Answer: Every foreign key value must match a primary key value in the associated table ie Parent table.

Q3. We can use Transactional control statements in Database Triggers ? Select TRUE or FALSE

Answer: False

Q4. Select the suitable option from below to create an index on "job" column in emp table?

Answer: Create Index emp_id on emp(job);

Q5. Which of the below constraints will make sure to allow, only the values of a column (in a master) to the respective column of a child table?

Answer: foreign key

Q6. Select suitable option for Normalization importance on a Database?

Answer: To avoid redundancy
     Data would not lost
     To fetch the perfect and exact data, required
     Applying changes to the table data without effecting the other attributes

Q7. Which of the following is a type of constraint?

Answer: CHECK
     UNIQUE KEY
     DEFAULT
     PRIMARY KEY

Q8. DCL Commands are used to enforce database security in a multiple user environment.Select TRUE or False

Answer: TRUE

Q9. Which is the below statement is used to remove access or privileges on database object to users?

Answer: Revoke

Q10. Select the suitable option for SubQuery?

Answer: Inner query executes first and then based on the output of inner query the outer query executes

Q11. The formal classifications describing the level of database normalization in a data model are called Normal Forms. Select TRUE or False

Answer: TRUE

Q12. A column with reference to a record in a table should not have multiple values Which of the normal form, Talks about the above statement?

Answer: First

Q13. The DDL commands are

Answer: DROP
      ALTER
      CREATE

Q14. What is the grant statement to grant select, insert delete privileges on table: Emp to user: TestUser? Emp is the table Names; TestUser is the User Name.

Answer: Grant Select insert delete on Emp to TestUser

Q15. Types of SQL statements are

Answer: DML
       TCL
       DDL

Q16. In the below table: EmpId|EmpName|ProjId 1 a p1> 2 b p1 >> 3 c p2 >>> 4 d p1
By referring the above table, Select a suitable query which gets all employees whose project is same as project of 'd'?

Answer: SELECT * FROM EMP WHERE Projid=(SELECT Projid FROM EMP WHERE EMPNAME='d')

Q17. Table structure:
EmpId|EmpName|ProjId|MNGR-Id|Location|Designation
Assume that the respective data values / attributes referred in the options were exists in the table By referring to the above table structure, For which of the below questions, we would require to apply the concept of SubQuery?

Answer: Query to get employee whose designation is same of SWARNA'S designation
       Query to get employee details belonging to dept of RAJA

Q18. From the table below:
EmpId | EmpName | ProjId | Projname | No.ofHoursWorked
What are the probable and decomposed tables after performing second normal form?Let us assume that, an employee can work for multiple projects for the above scenario.

Answer: Table:EmpId | EmpNameTable2:ProjId | ProjNameTable3:EmpId | ProjId | No.of Hours worked

Q19. Table: Emp
EmpId | EmpName | ProjId > 1  a  p1 >> 2  b  p2 >>>3  c  p3
        Table2: Proj
Proj | ProjId | Projname > p  1  AAA >> p  2  BBB
By referring to the above table structure Select the Query which would letch EMPID EMPNAME Projld, ProjName for each employee?

Answer: SELECT EMPID.EMPNAME. B.Projld. B.ProjNAME FROM EMP A,Proj B WHEREA. PROTID=B.PROJID


Q20. From the table below:
EmpId | EmpName | ProjId | Projname | No.ofHoursWorked
Let us assume that, an employee can work for multiple projects for the above scenario. What would be the primary key to get unique record from the table?

Answer: EmpId and projId together

Tuesday 19 May 2020

TCS Xplore Business Skills

Business Skills Final Assessment


Q1. Which statements are true with regard to 'customer' and 'client' ?

Answer: All options are correct.

Q2. Select the effective Statement

Answer: The manager's laissez-faire attitude has led to an efficient work culture in the team

Q3. You received the project requirements from the client you are not clear about a certain requirement what is the right way to respond?

Answer: Send an email to the client keeping your manager in the loop

Q4. It was Anjali's birthday one of a team members Prati sent her a birthday wish over an email . She had marked CC to all her team members and also to other team members Anjali was well known to many at the office. Therefore there are many who wanted to respnd to prati's email how should the other colleagues respond

Answer: Send a separate mail to Anjali conveying the wishes

Q5. Which is not a part of Pre-writing process?

Answer: Proof Reading

Q6. Amy a client partner from germany is having a discussion with the project team in india. Amy finds it uncomfortable speaking in their regional language amongst themselves. She feels a bit lost. What can the team do differently.

Answer: The Team lead should have stressed the usage of a common language that is English among team members.

Q7. When communicating with vendors which of the following statements is true?

Answer: We need to document every message between the vendor and TCS

Q8. How can one develop assertiveness?
A. By showing empathy
B. By showing sympathy
C. By ensuring that others agree with your points
D. By being open to feedback
E. By accepting everyone's views
F. By respecting everyone views

Answer: A, D, F

Q9. Amy a client partner from Germany is having a discussion with the project team in India. Amy finds it uncomfortable speaking in their regional language amongst themselves. She feels a bit lost. What can the team do differently.

Answer: Stereotypes help us identify different people and their backgrounds based on their attire, appearance or personality

Q10. Jalaja a saree to work. since she was sporting an ethnic look she wore big and bold accessories with flowers in her hair. makeup however was minimal.
Which of the following statements are correct.

Answer: She should not have women saree as it is not a formal wear. Flowers in the hair and bold accessories are also not acceptable. Minimum make-up is appropriate.

Q11. Cathy sends invitation to her team members for an unplanned meeting to discuss a new feature to be added in the project. Due to the shortage in time she sends the invitation without an agenda choose the right option 

Answer: An Agenda needs to be shared along with the meeting invite.

Q12. Agatha's team has been restructured. There are a number of associates who have joined from different parts of the country in the team now. Every member has certain stereotypes in their mind about the other members. What steps should the team take to resolve stereotyping?

Answer: Identify concepts that generate preconceived reactions. Unlearn these concepts and have a clean slate. Relearn these concepts in a neutral way

Q13. What is true about being Agile?
A. Agile teams can never fail.
B. Agile is driven by action.
C. Agile teams do not experiment
D. Agile teams do not believe in rationalism.

Answer: ONLY B

Q14. Please read the case study carefully and answer the question.

Chris Hurn stayed at the Ritz Carlton Hotel in Amelia Island on a vacation with his family, where his son accidentally left behind his dearest stuffed animal, Joshie. Chris told his son that Joshie decided to stay a little longer there. He called the hotel to enquire whether they have Joshie, as his son was feeling devastated without his little friend. Luckily, they found it and told Chris that they will send Joshie over.
To support Chris's little story, the hotel staff took a few pictures of Joshie having a massage, by the poolside, and taking a drive along the beach
Please choose the correct options which were followed by the hotel staff.

A. The staff was innovative
B. The staff identified the problem as an opportunity
C. The staff collaborated with the customer.
D. The staff believes in business value of fair-mindedness.
E. The staff was willing to experiment

Answer: A,B,C,F

Q15. It was Anjali's Birthday. One of her team members, Prati, sent her a birthday wish over an email. She had marked Cc to all her team members and also to a few other teams. Anjali was well known to many at the office and therefore there were many who wanted to respond to Prat's email. How should the other colleagues respond?

Answer: Send a separate mail to Anjali, conveying the wishes.

Q16. Select the appropriate statement while

Answer: "Hello Mr. Daniel Let's get this problem resolved for you. I'm going to transfer you to our specialist who is the best suited person to answer your question".

Q17. Mike wants to draft an e-mail to his client after his team came up with the rework of an application. The rework was asked to be done by the client due to some issues that the customers faced after the sample product was tested in the market. How should Mike start his email ?

Answer: Apologize to the client for not meeting his expectation.

Q18. How do you ask your Supervisor for a promotion in an assertive tone?

Answer: I would like you to consider my name for the promotion as I believe I have taken on many new responsibilities lately.

Q19. Daniel is planning on restructuring his team to make it more diverse. What are the possible challenges he will face in the process?

Answer: All of the above

Q20. Vivian had around 5 minutes before an important meeting. He found a client mail in his inbox that asked for an additional requirement. He is of the belief that emails need to be responded to promptly. Vivian wanted to be on time for the meeting and also wanted to reply to the client. What should he do?

Answer: Take time after the meeting and reply to the client, after analysis the requirement in detail.

Monday 18 May 2020

AsCEnD Java MVC and Web Development

Java MVC and Web Development Assessment


Q1. Select all options which are true about the welcome-file-list

Answer: When the only specified item is welcome.html, the server still treats index.html as a backup
        lf not specified the default landing page is index html

Q2. GenericServlet class is encapsulated inside ____ package?

Answer: javax.servlet

Q3. Which method is used to retrieve a form value in a JSP or Servlet?

Answer: request.getParameter(String)

Q4. When doPost() method of servlet gets called?

Answer: Both of the above

Q5. Which class provide implementation for service() method ?

Answer: HttpServlet

Q6. The _____ object is used to forward the request processing from one servlet to another?

Answer: RequestDispatcher

Q7. When init() method of servlet gets called?

Answer: The init() method is called when the servlet is first created.

Q8. Given request is an HttpServletRequest, which code snippets will creates a session if one doesn't exist?

Answer: request getSession();

Q9. Which of the following attribute is used to have uncaught run-time exceptions automatically forwarded to an error processing page?

Answer: errorPage

Q10. What file specifies the default welcome page?

Answer: Web.xml

Q11. Which method of HttpServletResponse is used to redirect an HTTP request to another URL ?

Answer: sendRedirect()

Q12. Which of the following code is used to get a HTTP Session object in servlets?

Answer: request.getSession()

Q13. How do you switch between Java code and HTML code in a jsp file?

Answer: Java code is the default HTML code is kept inside <%> brackets.

Q14. What is javax.servlet.http.HttpServlet?

Answer: abstract class

Q15. JSP pages are processed on the server

Answer: TRUE

Q16. What are the different techniques for managing a session?

Answer: All of the above

Q17. what is the return type of getAttribute(String name) in ServletRequest

Answer: String

Q18. Which of the below methods returns a string containing information about the serviet, such as its author, version, and copyrigh.

Answer: getServletinfo()

Q19. Which of the following attribute is used to mark a page as error processing page?

Answer: isErrorPage

Q20. Which of the following statement is not correct about HTTP method ?

Answer: A POST request append data to the end of the URL

Q21. session is instance of which class?

Answer: HttpSession

Q22. Choose the statement that best describes the relationship between JSP and servlets:

Answer: Servlets are built on JSP semantics and all servlets are compiled to JSP pages for runtime usage

Q23. Which tag in the jsp is used to define a page as an error page?

Answer: <%@page isErrorPage="true" %>

Q24. Which of these classes define the getWriter() method that returns an object of type PrintWriter ?

Answer: HttpServletResponse

Q25. Consider the following JSP page with an error in the Java code. What will happen when we try to access this jsp file on the server

Answer: The page will load normally, and the java errors which happen will be skipped.

Q26. Which of the following is not a implicit object?

Answer: cookie

Q27. Get is faster than POST method

Answer: TRUE

Q28. Which of the following is true about Initialization phase in JSP life cycle?

Answer: When a container loads a JSP it invokes the jsplnit() method before servicing any requests

Q29. The servlet-mapping element defines

Answer: a mapping between a servlet and a URL pattern

Q30. If in a form tag, no method attribute is specified, what function will be run?

Answer: doGet

Sunday 17 May 2020

AsCEnD Python Web with Flask

Python Web with Flask Assessment


 Q1. Which WSGI library implements requests and response objects in in Flask?

Answer: Werkzeug

Q2. Which HTTP methods are provided by Flask?

Answer: GET, PUT, POST

Q3. ________ is the default port number in which a Flask application runs on localhost.

Answer: 5000

Q4. Identify the correct syntax to install virtual environment in Python?

Answer: pip install virtualenv

Q5. Which function of the Flask class is used to tell the application which URL should call the which function?

Answer: route()

Q6. Output of the command: pip list

Answer: All of these

Q7. What is the correct syntax to inherit a html page from a base html page with name base.html using jinja template?

Answer: {% extends "base.html" %}

Q8. Match the following delimiters which their use for Jinja templates.

i. {% ... %} a. Comments not included in the template output
ii. {{ ... }} b. Statements
iii. {# ... #} c. Expressions to print to the template output
iv. # ...## d. Line Statements

Answer:  i      b
               ii     c
              iii     a
              iv     d

Q9. Which of the below concept is applied to differentiate in any web application to output on the web page?

Answer: decorator

Q10. Let's assume that there is an object / instance(of Flask class ) named as ins , created in an web application. Which of the below statement you need to write in the wep application project to start executing the project?

Answer: run()

Q11. While running your Flask app during the development, you run it as app.run(). However, you are facing a little inconvenience as everytime you change something in the code, you have to stop the server and run it again. What can be done so that you need not restart the server to detect the changes in the code?

Answer: AUTOLOAD mode can be set as TRUE

Q12. POST method is used to send HTML form data to server in an unencrypted format

Answer: FALSE

Q13. @Flask Instance.route('/Reports")
If i want to display output (of the function linked to the above decorator) What is the URL i need to type in the browser to run the application Assume the app Tunning on 127.0.0.1 under port 5500

Answer: 127.0.0.1:5500/Reports

Q14. Which flask library needs to be imported to return a template as the response object

Answer: render_template

Q15. ObjectInstance = Flask(_name_)
In the above snippet, What does the _name_ refers to?

Answer: name of the current module / App to record