write a python function Separate_List(A) (Refer RollNo_W8B_2.py ) which take list A as input and return five lists, one contains all prime numbers in A, second one contains composite numbers in A, the third list contains all numbers in A which are neither divisible by 2, fourth and fifth list contains number divisible by 3 and 5
Car Race
the goal of this code is to get output using with Classes.
input
first line of input contains a string playerName
second line of input contains a number nitro
third line of input contains a number speed
output
the output contains multiple lines with the appropriate texts
input1
Alyssa
100
1
output1
Race has started
Speed 50; Nitro 50
speed 70; Nitro 60
Alyssa is the winner
Speed 0; Nitro 60
function readLine() {
return inputString[currentLine++];
}
// Create your Super Class Race and Sub Class Car here
function main() {
const playerName = readLine();
const nitro = JSON.parse(readLine());
const speed = JSON.parse(readLine());
const car1 = new Car(playerName, nitro, speed);
console.log(car1.startRace());
car1.nitroBoost();
console.log(`Speed ${car1.speed}; Nitro ${car1.nitro}`);
car1.accelerate();
console.log(`Speed ${car1.speed}; Nitro ${car1.nitro}`);
console.log(car1.endRace());
car1.applyBreak();
console.log(`Speed ${car1.speed}; Nitro ${car1.nitro}`);
}
Bunty Birthday
the goal of the code to get output using with DateMethods.
input
output
input1
['2000-05-13', 'June 7 2021','03/24/2000']
output1
1
2
input2
['Jan 26 2000','Dec 13 2001, 'Nov 18 2001']
output2
function readLine() {
return inputString[currentLine++];
}
function main() {
const birthdaysList = JSON.parse(readLine().replace(/'/g, '"'));
const buntyBirthday = new Date("2000-06-13");
/* Please do not modify anything above this line */
// Write your code here
}
While taking a viva class teacher decides to take the viva of 2 roll numbers at a time. For
this he calls out the roll numbers from the roll number list as: one roll no. from 1st nth roll number and 2nd roll number from the nth last roll number. For example if the numbers are
roll-num=[31,25,4,22,5,43,11,30,6,17] and n=3 the one roll number for viva is 4 and 2nd roll number for viva is 30. Give fixed input.
Which one of the following is a password-attack ?
a. Blue-force-attack
b. Brute-force-attack
c. Bright-force-attack
d. Blu-force-attack
Which one of the following is a feature (in the video shown in class) belonging to phishing attack?
a. Outpersonating
b. Inpersonating
c. Forpersonating
d. Impersonating
Which one of the following is one of the 3-step-communication in networking ?
a. tcp-Syn
b. tcp-Seen
c. tcp-Sink
d. tcp-Sing
. Which one of the following is a famous cyber security attack type?
a. Man-in-the-head-attack
b. Man-in-the-middle-attack
c. Man-in-the-front-attack
d. Man-in-the-tail-attack
How many valid host addresses are available on an IPv4 subnet that is configured with a /25 mask?
a. 254
b. 126
c. 62
d. 30
. Which of the following is correct as part of DDos-attack (shown in class) ?
a. netsox 76 -i 10.0.2.6 -p 23 -s raw
b. netfox 76 -i 10.0.2.6 -p 23 -s raw
c. netwox 76 -i 10.0.2.6 -p 23 -s raw
d. netvox 76 -i 10.0.2.6 -p 23 -s raw