Gayatrry SD Python SQL JS
Gayatrry SD Python SQL JS
SD_Python SQL JS
Overall Status: Completed Detailed Status: Time Over Test Finish Time: August 30, 2024 07:13:45 PM IST
Gayatrry
G
gayathrrysre@[Link]
80 Marks Scored
out of 100 80 % 87.7 percentile
out of 244 Test Takers 1h 30m Time taken
of 1hr 30mins
Marks Scored
72
Section #1 90
96
Section #2 0
54
Section #3 80
93
Section #4 0
59
80
Total 80
88
Attempt Summary
Distribution of questions attempted in a total of 18 question(s).
18
Incorrect 5 Ques 0/20 Marks
This shows the correctness of questions attempted Not Attempted 0 Ques 0/0 Marks
by the test taker
Marks Scored
Marks percentage
72
Python 2.7
90
72
Total
90
Attempt Summary
Distribution of questions attempted in a total of 10 question(s).
Marks Scored
Marks percentage
0
Coding Skills - Basic
0
0
Total
0
Attempt Summary
Distribution of questions attempted in a total of 1 question(s).
1
Total Questions
Marks Scored
Marks percentage
8
Javascript
80
8
Total
80
Attempt Summary
Distribution of questions attempted in a total of 5 question(s).
Marks Scored
Marks percentage
0
Database Query Qu…
0
0
Total
0
Attempt Summary
Distribution of questions attempted in a total of 2 question(s).
2
Total Questions
Q.
Question 1 Time taken: 6m 42s Marks Scored: 8/8
1
Question
Which of the following strings is/are not matched by the given Python Regex?
1 import re
2 r = [Link]('^[A-Z]{5}[0-9]{4}[A-Z]{1}$')
Response
'AAAAA0000B'
'ABCDE0000XX'
'ABCDEF1234X'
Question
Response
String
List
Tuple
Q.
Question 3 Time taken: 3m 7s Marks Scored: 8/8
3
Question
1 a,b=[1, [2], 3]
Response
a=1, b=[[2],3]
a=[1,[2]], b=3
[1,2,3,[4,5]]
Syntax error
Question
What will be the output of the given code in Python version 2.7?
Response
1 False
2 True
3 True
4 True
5 False
1 False
2 True
3 False
4 True
5 False
1 false
2 true
3 true
4 true
5 false
1 0
2 1
3 1
4 1
5 0
Question
Response
0x21
ABC
0xA0xB0xC
33
Question
In Python version 2.7, what does the given expression evaluate to?
Response
1 ['a', ' ', 'b', ' ', 'c', ' ', 'd']
1 ('a', ' ', 'b', ' ', 'c', ' ', 'd')
Question
In Python version 2.7, what does the given expression evaluate to?
Response
''
Syntax error
True
False
Q.
Question 8 Time taken: 1m 25s Marks Scored: 8/8
8
Question
Which of the following members can Python classes have in Python version 2.7?
Response
Public
Private
Protected
Question
In Python version 2.7, what does the expression 2**10 evaluate to?
Response
20
2*e10
1024
Syntax error
Q.
Question 10 Time taken: 2m 30s Marks Scored: 8/8
10
Question
Response
[4, 4, 4]
Syntax error
[1, 2, 3, 3, 2, 1]
Q.
Question 1 Compilation: Successful Time taken: 32m 3s Marks Scored: 0/8
1
Question
Arrangement
Given an array of size n, write a function to rearrange the numbers of the array in such a way that even and odd numbers are arranged
alternatively in increasing order.
Input Specification:
Output Specification:
Example 1:
input1: 5
input2: {9,12,23,8,5}
Output: {5,8,9,12,23}
Explanation:
As the numbers are to be arranged in increasing order hence we start with 5 in the given array, also the starting number is odd therefore the
next number has to be even and has to be smallest in even number i.e. 8 ....and so on.
Hence the output is {5,8,9,12,23}
Example 2:
input1: 5
input2: {47,49,36,98,90}
Output: {36,47,90,49,98}
Explanation:
In the given array, 36 is the smallest number hence we start with it and arrange the series as even-odd alternatively.
2 class UserMainCode(object):
3 @classmethod
4 def arrange(cls, input1, input2):
5 '''
6 input1 : int
7 input2 : int[]
8
9 Expected return type : int[]
10 '''
11 # Read only region end
12
13 def rearrange_alternatively(arr):
14 #Separate even and odd numbers
15 evens = [num for num in arr if num % 2 == 0]
16 odds = [num for num in arr if num % 2!= 0]
17
18 #Sort even and odd numbers
19 [Link]()
20 [Link]()
21
22 #Initialize result array
23 result = []
24
25 #Merge sorted even and odd numbers alternatively
26 i,j = 0,0
27 while i < len(evens) and j < len(odds):
28 [Link](evens[i])
29 [Link](odds[j])
30 i += 1
31 j += 1
32
33 #Append remaining even or odd numbers if any
34 while i < len(evens):
35 [Link](evens[i])
36 i += 1
37 while j < len(odds):
38 [Link](odds[j])
39 j += 1
40 return result
41
42 #Example usage
43 arr = [9, 12, 23, 8, 5]
44 print(rearrane_alternatively(arr))
Q.
Question 1 Time taken: 1m 15s Marks Scored: 2/2
1
Question
Which of the following statements will complete the given code to perform the operation of opening the window1 and loading the page
[Link] into it?
Response
window("[Link]","window1")
[Link]("[Link]","window1")
[Link]("window1","[Link]")
[Link](window1,[Link])
Question
What will be the output of the given code when the user clicks My Button?
1 <body>
2 <p id="myNode">This is Node</p>
3 <button onclick="myFunction();">My Button</button>
4 <script>
5 function myFunction(){
6 var oldP = [Link]("myNode");
7 [Link]="New text";
8 }
9 </script>
10 </body>
Response
Question
What will be the output of the following JavaScript when a user clicks on the Submit button?
1 <script type="text/javascript">
2 var fruits = ["Mango", "Banana", "Apple", "Orange"];
3 function showListOfFruits(){
4 for(var i=0; i< [Link]; i++ ){
5 [Link]("showFruits").innerHTML = fruits[i]
6 }
7 }
8 </script>
9
10 <button onclick="showListOfFruits()"> Submit</button>
11 <ul>
12 <li id="showFruits"></li>
13 </ul>
Response
Mango
Banana
Apple
Orange
Orange
Apple
Banana
Mango
Question
What will be the output of the given code when the user clicks My Button?
Response
Error
Question
What will be the output of the given code when the user clicks the button?
1 <body>
2 <button onclick="myFunction(this);">Test attribute!</button>
3 <script type="text/JavaScript">
4 function myFunction (button) {
5 var newAttr = [Link] ("myAttribute");
6 [Link] = "My Value";
7 [Link] (newAttr);
8 [Link] ([Link] ("myAttribute"));
9 }
10 </script>
11 </body>
Response
False
Test attribute!
My Value
Q.
Question 1 Time taken: 17m 26s Marks Scored: 0/1
1
Question
The employee name, employee category and bonus pay (use alias BONUS) for all employees based on the following criteria:
You can view the database schema by clicking the View Schema tab at the bottom of the query window on the right-hand side of the
screen.
Response
Answer 1 select empname, employee_category, case employee_category when 'A' then 6000
when 'B' then 4000
MYSQL 8.0
2 when 'C' then 3000
3 when 'D' then 2000 else 1000 END "BONUS" from employee_info;
Question
The count (use alias count) of express trains that start from New Delhi (NDLS) and go to Mumbai (BCT) or Bhopal (BHP).
You can view the database schema by clicking the View Schema tab at the bottom of the query window on the right-hand side of the
screen.
Response
Test Cases
Count operator and sub 2 Row(s), 1 Columns(s) 0 Row(s), 0 Columns(s) 0.0/10.0 Solution Query Failed to
query Execute Reason: Table
'trains' doesn't exist
Images of Test-Taker
05:43 PM 05:50 PM
06:12 PM 06:20 PM
06:33 PM : Candidate Face Partially Visible 06:33 PM : Candidate Face Partially Visible
This Report is generated electronically on the basis of the inputs received from the assessment takers. This Report including the AI flags that are generated in
case of availing of proctoring services, should not be solely used/relied on for making any business, selection, entrance, or employment-related decisions.
Mettl accepts no liability from the use of or any action taken or refrained from or for any and all business decisions taken as a result of or reliance upon
anything, including, without limitation, information, advice, or AI flags contained in this Report or sources of information used or referred to in this Report.