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}`);
}
Suppose that the net external force
(push minus friction) exerted on a
lawnmower is 51 N (about 11 lb)
parallel to the ground. The mass of
the mower is 24 kg. What is its
acceleration?
Two charges q1 = 4microC and q2 = -7 microC by 3.5m and 1.5m. Calculate the electric potential at point B having a distance of 2m.
Thatobaked 25 muffins. He gave 3/25 of the muffins to his friend and 9/25 of the muffins to his sister.what fraction of the muffins is left?
Neon lights in an industrial park are replaced at the rate of 100 units per day. The physical planet orders the neon lights periodically. It costs Rs.500 to initiate a purchase order. A neon light kept in storage is estimated to cost about Rs.20 per day. The lead time between placing and receiving an order is 12 days. Determine the optimum inventory policy for ordering the neon lights.
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
Types of evolution