Given an array
"use strict";
process.stdin.resume();
process.stdin.setEncoding("utf-8");
let inputString = "";
let currentLine = 0;
process.stdin.on("data", (inputStdin) => {
inputString += inputStdin;
});
process.stdin.on("end", (_) => {
inputString = inputString.trim().split("\n").map((str) => str.trim());
main();
});
function readLine() {
return inputString[currentLine++];
}
/* Please do not modify anything above this line */
function main() {
const myArray = JSON.parse(readLine());
/* Write your code here */
}
kindly share the following code
18) Which of the following keyword of VB.NET is used to throw an exception when a problem shows up?
A) Try B) Catch C) Finally D) Throw
19) Which of the following is not an event in VB.NET?
A) mousehover B) mousedrop C) mousedown D) mouseup
20) Which of the following converts the expression to string data type in VB.NET?
A) Cstr(expression) B) CSByte(expression) C) CShort(expression) D) CSng(expression)
21) which is not a main component of Visual Studio IDE?
A) start menu B) Tool box C) designer window D) Solution Explorer
14) Which of the following access modifier specifies that Visual Basic should marshal all string to American National Standard Institute (ANSI) values regardless of the name external procedure b
A) Ansi B) Assembly C) Async D) Auto
15) Which of the following access modifier specifies that Visual Basic should marshal all strings to Unicode values regardless of the name of the external procedure being declared?
A) Shadows B) Shared C) Static D) Unicode
16) The function procedures are ________ by default.
A) public B) private C) protected D) inherited
17) Which class is not contained in the import System.Data.SqlClient?
A) SqlConnection B) SqlCommand C) SqlDataReader D) SqlDataManipulator
10) Which of the following import contains SqIDataAdapter?
A) System.Data.SqlAdmin B) System.Data.SqlClient C) System.Data.Sql D) System.Data.Client
11) The system.systemException class is the base class for all predefined system exception in VB.NET?
A) True B) False
12) Which of the following converts the expression to Decimal data type in VB.NET?
A) CDbl(expression) B) CDec(expression) C) Cint(expression) D) CLng(expression)
13) The ________ method converts the value of this instance to a double representing the OLE automation date.
A) Now B) Today C) TO OA Date D) From OA Date
6) Which of the following operator declares the parameters and code that define a function lambda expression?
A) AddressOf B) Await C) GetType D) Function Expression
7) Which of the following loop structure dose not supported by VB.NET?
A) Do ………… loop B) For ………… Next C) Do ………… Then D) For Each ………. while
8) Which of the following converts the expression to Char data type in VB.NET?
A) Convert.ToBool(expression)
B) Convert.ToCharater(expression)
C) Convert.ToString(expression)
D) Convert.ToChar(expression)
9) Which of the following block of VB.NET identifies a block of code for which particular exceptions will be activated?
A) Try B) Catch C) Finally D) Throw
1) Which of the following access modifier specifies that one or more declared programming elements are accessible from within the assembly that contains their declaration, not only by the component that
A) ByRef B) ByVal C) Default D) Friend
2) The __________ class provides static methods to start, stop, or filter Windows message in an application.
A) Forms B) Control C) Windows D) Application
3) Which of the following collection class of VB.NET uses a key as well as an index to access the items in a list?
A) Arraylist B) Hashtable C) Sortedlist D) stack
4) Which is not a property of the common control class?
A) Font B) Show C) Fore color D) BackColor
Answer the following in your own words.
Chess Game Knight’s travails. You are required to do the following: 1. Explain how you can ensure that any move do not go off the board. 2. Choosing a search algorithm for finding the shortest path for the knight’s travails. 3. Defend your choice of an appropriate search algorithm to find the best possible move from the starting square to the ending square. 4. Creating a script for a board game and a knight. 5. Create a diagrammatical tree structure, to illustrate all possible moves of the knight as children in the tree structure. In this task, you need to understand two algorithms which can be helpful, the BreadthFirst Search which utilizes the Queue data structure to find the shortest path and the Depth-First Search which can traverse a Stack data structures. Hint: Develop a data structure similar to binary trees. Using a standard 8 X 8 chessboard, show the knight’s movements in a game.
M = int(input())
P = int(input())
C = int(input())
list1 = [M,P,C]
list2 = []
for i in list1:
list1.remove(i)
for j in list1:
if i + j >= 100 and M + P + C >= 180:
list2.append(True)
else:
list2.append(False)
if False in list2:
print(False)
else:
print(True)The Above code have three test cases, but they were getting only two test cases as expected output, third test case were not getting expected output.
Question url link :- https://drive.google.com/file/d/1xObf_3zdyEfD8yEtB5V4OqL6HVzEd7h1/view?usp=sharing
The test cases are below
Test Case – 1
Input
82
55
45
Output
True
Test Case – 2
Input
71
30
70
Output
False
Test Case – 3
Input
40
90
50
Output
True