Professional Documents
Culture Documents
Answers Final - Merged
Answers Final - Merged
console.log(2+"2"+"2")
Fine: A function like this is very common in undefined function
JavaScript. What is at termed as?
please tell me if I have to create a CSS class for .div{
"div" tag how should I define it? }
Okay. We now go over some web <ol>
development related stuff - about HTML, CSS <li>HTML</li>
and javascript. Now please see the code <li>java</li>
alongside and let me know which option is <li>javascript</li>
used to display list in numbered format. <li>sql</li>
</ol>
OR
<ol>
<li>geetha</li>
<li>meetha</li>
<li>rakesh</li>
<li>arit</li>
</ol>
html/css/ js code along side option to display Option 2 <select><option
select box value=”1”>maths</option>…….</select>
How to create a css class for div tag .div
fine.i presume you know about bootstrap css Option 3 and 4
if not no problem.one does include
Bootstrap.min.css or bootstrap.css, in the
page to use bootstrap. now tell me-Which
statements about these files are correct?
<head> will be rendered with grey background and white text
<style>
Body{background-color:grey;}
H1{color:blue;}…….</body>
got it Now tell me what will be the output in undefined
this code
var test;
alert (test);
Which html element should be used in a form 3. Check Box
if you want the user to choose multiple values
at a time?
variable use in js option 1 & 2
In javascript "this" always refer to depend on context
We now go over some web development Option 2
related stuff-about html,css and <select>
javascript.now please see the code alongside <option value=”1”>……
and let me know which option is used to ……
display select box for a user a value from the </select>
prefilled list?
In the code alongside,the container has width Option 1
of 300px.the items being displayed have each Container width will be executed to fit four divs
width of 100px and there are 4 such items.
What will happen when they get rendered?
<html>
…..
…..
<</html>
I wish to extract the number from this string match()
using javascript function.which is the Match method is used
function?
I was told that jquery is used to execute sql No
queries within browser using javascript do
you agree?
Use of isNaN() function in javascript? Returns true if the value is not a number
It is possible to include javascript and j query Yes
code on single html page.
For div tags to render next to each other in a Option 1,2,3
flex layout. Which of the points are
mandatory?
In javascript to connect a numeric value from Parseint()
string to integer which function will come
handy?
What is the html5 tag is typically used for Body
rendering menu at the top of the page after
header?
About css and web development in general. Option 2 and 3
Go through the options alongside and let me
know what are the correct statements
regarding advantages of css
Which of the statements listed alongside are Insert into employee (id,firstname,lastname,salary)
ddl(data definition language) statement? values(1,joe,..)
8 times
Have a look at the code alongside and let me
know how many times word “ bad” will be
displayed in the output?
For (var i=1;i<=20;i++)
…
…
Console.log(“bad”);
}}
We now will go over javascript, html and css Console.log(“message text”)
which from the listed is the correct way to
display debugging messages to the browsers
console using javascript?
Now tell me which of the statements Option 1 and 2
mentioned alongside are correct Javascript supports defining classes and objects
Javascript does not support inheritance though
now if I set j to I instead of 0. What will be the Option 1
output? Less than 100
Set i=o;
Set j=0;
Set count=0;
…
…….
Print (count)
PYTHON
all right as a trainee developer came to know that Yes this is perfectly legal
python works without specifying variable types, she
wrote something like this.(see alongside)not sure of
this is legal in python. What do you think?
x,y,z = 1,2,”sam”
a bit about looping in python,what will be the FINE OK COOL ALRIGHT
output in this case?
My_list = *‘fine’,’ok’,’cool’,’alright’+
For m in my_list:
print(m)
If(m==’ok’):
continue
Something about iterable. To make custom class _iter_-option 1
iterable. which method need to be implemented?
Here is a typical python question Str=””” this is a”unique”feature”” and
I have a text with a quoted word in it ,as mentioned str = "That is a \"unique\" feature"
below.what is the right way to represent it in
python?
Str =”this is a”unique”feature”
while(true) it will run only if "some condition" is satisfied.
{
// Some code here
if(some condition)
{ break the loop }
}
What will happen if you run a code like the one it will run till some condition is satisfied
shown in the snippet alongside?
while (true)
// Some code here
if (some condition)
break the loop
The process in which python reclaims unused Garbage collection
memory block at periodic interval is termed as
Which key word is used when writing a function def
python
Now tell me what an extra key inserted at the end sentinel
of the array is called?
Just tell me what will be the output? 12.5
x=100i
x=x/8
print(x)
when I try to execute following line of code, it print(int(str) + n))
generates a typeerror.how can I fix this to have
output as 100
When I try to execute following line of code, it print((int)str+n))
generates a typeerror. How can I fix this to have
output as 100
a= '34'
b= 66
print (a+b)
Python hands on – sumEven
for i in arr:
Arr=[10,19,16,22,10,19] if arr[i]/2==0:
Num=int(input()) sumEven +=arr[i]
Arr.append(num)
Sumeven=0 OR
for i in arr:
if i%2==0:
sumEven +=i
Let me know which statement mentioned about Option 2 and 3
tuples and lists are correct The values of elements in a tuple can not be updated
The lists can have more than two elements
dictionary in python using list # Creating an empty dictionary
myDict = {}
# Adding list as value
myDict["key1"] = [1, 2]
# creating a list
lst = ['Geeks', 'For', 'Geeks']
# Adding this list as sublist in myDict
myDict["key1"].append(lst)
print(myDict)
my_dict = {1: 'laptop', 2: 'TV', 3:'Smartphone'} for i,j in my_dict.items():
key_list = [] key_list.append(i)
value_list = [] value_list.append(j)
my_dict[4] = input()
Here is a typical python question (the string one) option 1
Accept and store a two digit integer in an array, Add arr = [10,19,16,22,10,19,18,12]
only those numbers from the array which have only num = int(input())
one occurence, You should store the sum in variable arr.append(num)
named sumNoDup, The number entered may or sumNoDup = 0
may not be duplicate, You should not print the if num == 10 or num == 19:
output, sumNoDup is printed at the end. sumNoDup = sum(arr) - 58
elif num in [16,22,18,12]:
arr = [10,19,16,22,10,19,18,12] sumNoDup = sum(arr) - 58 - num
num = int(input()) else:
arr.append(num) sumNoDup = sum(arr) - 58 + num print(sumNoDup)
sumNoDup = 0
or
arr = [10,19,16,22,10,19,18,12]
num = int(input())
arr.append(num)
sumNoDup = 0
dic={}
for I in arr:
if I in dic:
dic[i]+=1
else:
dis[i]=1
for I,j in dis.items():
if j==1:
sumNoDup+=i
print(sumNoDup)
a=10 1000
b=3
print(a**b)
I wish to extract the number 40 from this string substring function
using javascript function. Which is that function?
multiple variable assignment legal in pyhton yes, it is legal
x,y,z=....
What will be the size of the directory in the case Answer: 4
alongside?
My_dict={}
Key_list=[100,200,300,400]
Value_list=*‘sam’,’tom’,’pat’,’not’+
For I in range(len(key_list)):
my_dict[key_list[i]]=value_list[i]
Size=len(my_dict)
Print(size)
how many times "Bad" will be displayed in the 8 times Bad will Display
output?
Which keyword is used while writing a function in def
python?
Predict the output of the python code alongside. 1
2
‘abc’ in ,:’abc’,2:’pqr’,3:’xyz’-: 4
Print(1)
Print(2)
If ‘a’ in ‘xyz’:
Print(3)
Print(4)
same as 178. 0
Now look at the pseudo code alongside and answer TRUE
the question
if((a>45 or b>50)and(c>10))
{
if(a>45)
{
print((a>45 or b>50) and (c>10));
}}
Else
{
print((a>45) or (b>50 and c>10));
}
A=61,b=34,c=8 true
What will be output of the following code?
print((a>45 or b>50)and(c>10))
Which of the logical conditions below are equivalent Option 1 and 3
Def func(x=20,y=0):
Return(x+y)
Inside a function, if a value assigned to any local
undeclared variable, that variable will get created
with_______scope.
Concept of array in programming is pretty effective Loops
due to _______
arrayUnique=[] For I in sentence:
sentence=input() arrUnique.append(i)
… arrUnique.sort()
….
Arrunique.sort()
Print(arrunique)
which one will be complete the evaluation Option:2
/execution faster?
What will be the output of the code snippet 101
alongside?
X=101
Def somefunction()
X=67
Somefunction()
Print(x)
Here is the original code back if I change the Also takes given as output
condition from < to <= for both the loops what
should be the output?
Programmers prefer to write a function calls itself. Recursion
What so you call such a function?
Age should be between 18 and 60 both inclusive? Age>=18 AND age<=60
Tup1=[10.3] Error as tuples are immutable
Tup[0]=100
Print(tup1)
Set i=0; 100
Set j=0;
Set count=0;
Loop till i<10…
…..
….
Print(count);
SQL
Which of the following keywords listed alongside Aggregate function=(max ,count,min,sum,avg) OPTION 3
are aggregate functions? AND 4
which of the statement(s) about JOIN is correct. Option 1 & 2
Both 1 and 2 are correct
there are departments which do not have any select * from department
employees. I would like to have list of such where employee="null"
department name in asc? sort by name
OR
select deptno from emp
where deptno is null or deptno=0;
Hands on task list the first name of all the select first_name from employee where dob in ('1970-
employees born on or before 1st January 1970 in 01-01')
asc order of first name. order by first_name asc;
what is the command to empty a database table?I ANS: Truncate
do not want to delete the table, just delete all its
contents.
Which of the statement are correct option 1 & 4 1.function can return vaue 4. procedure
cannot return a value
Which statements are correct 1)merge sort worst
case time complexity is better than quick sort 2)
Merge sort takes more space than quick sort
Write a sql to get the count of departments from Select count(*) from department
departments table that do not have a manager. Where department not in manager;
what is the problem with the sql statement where clause is missing
alongside? assuming that the field and table
names are correct
2 if you have to prepare testcases for a software, what will you use as your option 1) requirements
primary reference documents
3 very important from application maintenance/product releases etc. One Regression testing
needs to test the software to ensure that pre existing functionality works
without any problem when you rerelease some new features. What is the
term used for such a testing?
4 okay lets discuss about testing now.acceptance testing can be considered Yes
as black-box testing do u agree?
6 term used for the artefact, which captures users req user story
10 The testing which is typically carried out by the end user towards the end Acceptance Testing
other
11 Unit testing is a part of static testing activity Correct
Agile and Scrum
1 can u tell me what is the term used for -a measure of the amount of works ans. velocity
a
team can complete during a single sprint
2 now lets discuss about agile and scrum .tell which of the statements d. option 1 and
mentioned are correct 3
5 what is the term used for a measure of the amount of work a team can Velocity
complete durinng a single sprint
6 4 product Owner
who owns product backlog and prioritisation in agile methodology
11 An acceptance criteria should be part of user story not a sprint of backlog? TRUE
12 scrum and kamban are two different strategies used to implement agile FALSE
methodology and they are not the replacement of agile . True or false
17 Please see the options alongside and let me know which are the statements Option 1
are correct
18 Please look at the statement alongside and let me know if true or false TRUE
2 who manages the application deployement and upgrades in saas offerning? b.option 1
3 The software that makes virtualization possible on a server is termed as ans: hypervisor
4 in terms of increasing level of responsibility for the cloud provider the 3 1 2 ( IaaS PaaS SaaS )
service where cloud provider has least responsibility should come first ?
6 In cloud concepts. Which Out of the listed items may be shared in a doud option 1 (network router )
with in multiple customers?
7 who manages the application deployment and upgrades in saas offering? Cloud service provider
10 Which of the points listed alongside are cloud essential characteristics Option 1,2,3
11 Which Cloud characterstic makes it possible to change customers based Rapid elasticity
upon their usage
12 Iaas means Infrastructure as a service
1.
ANS:
10n bytes
3. Which statements along sidedosent apply to binary search –
i)The data to be searched must be sorted.
ii)It returns position of the item and not value of the item
ANS:
Both are true.
option 1 and 2
9. Okay, let's see the binary to decimal stuff-Can you tell me which is the binary
equivalent of decimal number 67?
ANS:
10000011
11. So you must be aware about the common term used to adding data item to a
stack?
ANS:
Push.
13. Python works without specifying variable types, she wrote something like this. x,y,z =
1,2,"Sam"?
ANS:
Yes, This is perfectly legal.
16. a =61, b=34, c=8; if((a>45 or b>50)and(c>10)){ if(a>45){ print((a>45 or b>50) and
(c>10)); }} else{ print((a>45) or (b>50 and c>10)); }
ANS:
TRUE.
24. which is to be consider worst case time scenario in linear search algorithm?
ANS:
item is the last element in the array.
25. Now tell me what an extra key inserted at the end of the array is called?
ANS:
Sentinel.
26. Tell me which of the statement(s) along side doesn't apply to binary search?
ANS:
it returns to the position of the item and not value of the item.
28. Fine. Now, if I want an expression in which the last character is not numeric. Which
expression is a correct wildcard pattern?
ANS:
*[!0-9]
29. While passing a large data to a function which method will be more efficient from
perspective speed?
ANS:
Pass by reference.
31. The fastest possible way to access the elements in a random array?
ANS:
option 3 : using the index.
38. An acceptance criteria should be part of user story not a sprint of backlog?
ANS:
TRUE.
39. Cloud concepts and virtualization. The software that makes virtualization possible on
a server is termed as?
ANS:
Hypervisor.
40. can you tell me which commant can be used to manage resource limit of a user
session in linux?
ANS:
Unlimit.
41. if you know the unlimit then you may also know about soft and hard limits on
resources.tell me which statements are correct?
ANS:
soft limit can never be greater than hard limit.
42. to make the script interactive which command is used? i mean rather than providing
command line arguments how do you get the input just in time?
ANS:
Prompt.
43. In terms of increasing level of responsibility for the cloud provider the service where
cloud provider has least responsibility should come first ?
ANS:
3 1 2 ( IaaS PaaS SaaS ).
45. In cloud concepts. Which Out of the listed items may be shared in a doud with in
multiple customers?
Ans:
option 1 (network router ).
46. what is the term used for a measure of the amount of work a team can complete
durinng a single sprint ?
ANS:
Velocity.
47. The fastest possible array to access the element in a random array ?
ANS:
Using Binary Search.
48. Can you tell me how much memory n byte an array of 10 elements occupy if each
element is of 'n' bytes?
ANS:
10n bytes.
49. Set i = 0; Set j = 0; Set count = 0; Loop till i < 10 { Set j = 0; Loop till j < 10 { Increment j
by 1; Increment count by 1; } Increment i by 1; } print(count); ?
ANS:
100.
50. Burndown charts visually show work being completed in comparison to work that
still needs to be done?
ANS:
TRUE.
Shell Scripting & Linux
1. #|/bin/bash
my_var=”Skill”
echo my_var
echo \”$my_var
echo $my_var
2. ((area=1.5*2))
echo $area
3. String1=”Shell”
String2=”Script”
String3=$string1+string2
echo $string3
OUTPUT:
Shell+Script
4. for a in 2 3 4 5 6 7 8
do
if [$a==5]
then
break
fi
echo “$a “
done
output:
2
3
4
5. read userinput
if[ $userinput==BYE ]; then
echo “Good “$userinput
else
echo “Welcome “$userinput
fi
OUTPUT:
Good BYE
6. read area
area_square()
{
echo $(($area*$area))
}
area_square $area
OUTPUT:
4
16
7. #|/bin/bash
Count=0
read divisor
for n in 10 12 15 20 30 51 64 80
do
if [ n % divisor == 0 ]
then
count=count+1
fi
done
echo $count
OUTPUT:
8. The developer is trying to run a shell script inside another shell script. Do you think it
will work?
ANS:
Option 1.
9. Cd/home/testdata
echo “$?”
ANS: 0
option 4.
10. Tell me how will you save a file and exit the editor?. I mean what command will you
use in vi?
ANS: :wq
11. Look at the shell script along side tell me what will be the output if i execute it?
#!/bin/bash
((area=1.5*2))
echo $area
ANS: Option 1
(my_var
“Skill
Skill)
14. Write a program to find the whether the name where is found?
ANS:
read user_input
name=(sam ram pam tam leele pat)
foundat=0
i=1
for name in ${name[@]};
do
if [ $name == $user_input ];
then
foundat=$i
echo "Name is found at "$foundat
else
i=$(($i+1))
fi
done
echo $foundat
15. Write a program for whether the two number are equal or not?
ANS:
a=1
b=1
if [ $a == $b ];
then
echo "Equal"
else
echo "Not Equal"
fi
read k
for ((i=1; i<=k; i++))
do
for((j=1; j<=k; j++))
do
echo -n $i" " $j $'\n'
done
done
20. #!/bin/bash
cd /home/testdata echo "$?"
ANS:
0
21. Can I install windows OS for VM which is to be created on a HOST Server runinglinux?
ANS:
Yes, certainly
22. Which one of the following command will be used to searching "subject" text in
syllabus.txt file??
ANS:
grep "subject" syllabus.txt
23. Now look at the script along side I want to print "a is equal to b", in order to do that
which relational operator should I use??
ANS:
-eq
24. In shell script which sign is used to print the total number of command-line
argument passed
ANS:
$#
26. Which command is used for to find file from current directory?
ANS:
C. find . -name example.txt
28. Create the dictionary from two lists.(linux)task.txt will run after giving Executing
permission??
ANS:
Yes
29. Check the number are equal or not => Shell Script
ANS:
#!/bin/bash
a=1
b=1
if [ $a == $b ];then echo "Equal hai"
else
echo "Equal nahihai"
fi
# "Alternative method"
# -eq is same as "=="
30. okay.which of the following is responsible for print current process id?
ANS:
echo$$
31. All right.Which of the following command sets the execute permission to the shell
file?
ANS:
chmod+xthe_file_name
32. What will happen if press in Ctrl-Z key combination in shell, choose the correct
option from along side?
ANS:
suspends the process and running the shell
36. cp Employee.txt ..
ANS:
b. Parent Directory
41. can u tell me which of the names mentioned alongside are linux distributions
ANS:
c. options 1,2,3
43. which of the following command will be used for searching "subject" text in
syllabus.txt file?
ANS:
option 4
44. Write a function to return area of square Read the requirement and fix it. if [ $a ==
$b ] then echo "a is equal to b" ?
ANS:
45. 00 11,16 * * *
In shell script which sign is used to print the total number?
ANS:
Run the backup every day of every month from 11 AM to 4PM.
46. Now look at the script along side I want to print "a is equal to b", in order to do that
which relational operator should I use??
ANS:
a. –eq
47. which of the following command sets the execute permission to the shell file?
ANS:
chmod +x the_file_name
50. If you know ulimit then you may also know about soft and hard limits on
resources.tell me which statements are correct
ANS:
b.option 2
52. Which command is used for to find file from current directory ?
ANS:
C. find . -name example.txt
53. Which one of the following command will be used to searching "subject" text in
syllabus.txt file??
ANS:
grep "subject" syllabus.txt
55. nano editor how do you come out of editing to save file?
ANS:
ctrl+x.
56. Python works without specifying variable types,she wrote something like this see
alongside not sure if this legal in python what do you think?
ANS:
Yes,This is perfectly legal.
ANS:
“Hi” only once.
58. Whatwill happen if you run a code like the one shown in the snippet alongside?
while(true)
{
//some code here
if(some condition)
{
break the loop
}
}
ANS:
option 2
61. The another advantages that CSS usage brings in is – better integration with multiple
web services IIS Apache etc.. Do you agree?
ANS:
Yes.
62. Look at the scenario along side and tell me correct option?
#!/bin/sh
date=$(date ‘+%d-%m-%y’)
echo $date.
ANS:
Yes it will work
64. What will happen if you run a code like the one shown in the snippet alongside?
ANS:
Option 2 It will run till "some condition" is satisfied.
65. have a look at the pseudocode alonside and answer the question?
ANS:
option 3 and 1.
67. Which command is used for to find file from current directory?
ANS:
C. find . -name example.txt
68. In shell script which sign is used to print the total number of command-line
argument passed?
ANS:
$#
70. Scrum and kanban are two different strategies used to implement the agile
methodology and not the replacement?
ANS:
TRUE.
72. Which one of the following command will be used to searching "subject" text in
syllabus.txt file?
ANS:
grep "subject" syllabus.txt.
74. which of the following is responsible for print current process id?
ANS:
echo $$.
75. Can I install windows OS for VM which is to be created on a HOST Server runing
linux?
ANS:
a. Yes, certainly.
76. #!/bin/bash
cd /home/testdata
echo "$?"
ANS:
4. 0
77. Which is the valid variable from below list?
ANS:
3. VAR_1.
80. If you know ulimit then you may also know about soft and hard limits on
resources.tell me which statements are correct?
ANS:
b.option 2.
82. can u tell me which of the names mentioned alongside are linux distributions?
ANS:
c. options 1,2,3.
84. which of the following command will be used for searching "subject" text in
syllabus.txt file?
ANS:
option 4.
85. To make the script interactive which command is used? i mean rather than providing
command line arguments how do you get the input just in time?
ANS:
d. read.
86. you must be knowing about "su" command. tell me what the listed command is
doing?
ANS:
c. option 3.
87. if i save the shell script with task.txt instead of "task.sh" and just add execute
permission for the world to "task.txt".?
ANS:
a. yes.
88. here are a few statements about linux shell. please check which are correct?
ANS:
option 1 and 3.
89. let's have a look at redirections pipes, etc. in linux. tell me which of the following
symbols can be used to send the o/p to another prog?
ANS:
b. >>.
91. look at the command alongside, is somefile.txt being used for input redirection or
output redirection?
ANS:
output redirection.
94. In linux,which of the symbol(s) can be used to send the output to another program?
ANS:
Option 1.
.
95. install windows OS for a VM which is to be created on a host server running linux?
ANS:
option 1: Yes certainly.
96. Agile and scrum concepts. Please let me know if this statement is true-"scrum and
kanban are two different strategies used to implement agile methodology and they
are not the replacement of agile" ?
ANS:
TRUE.
97. scrum methodology suggests a standup meeting,should be used for planning the
overall deliverables and not to resolve what challenges are faced by individuals?
ANS:
TRUE.