The FizzBuzz Game
by CodeChum Admin
Let's play a game of FizzBuzz! It works just like the popular childhood game "PopCorn", but with rules of math applied since math is fun, right? Just print out "Fizz" when the given number is divisible by 3, "Buzz" when it's divisible by 5, and "FizzBuzz" when it's divisible by both 3 and 5!
Let the game begin!
Input
A line containing an integer.
15
Output
A line containing a string.
FizzBuzz
Input a random positive integer.
Using a for() loop, generate the factorial value of the integer and print out the result.Tip: Factorials work like this: Factorial of 5 = 1*2*3*4*5
Note that there is a special case and that is the factorial of 0 which is 1.
Input a random positive integer in one line. This will serve as the ending point of your loop.
Using a for() loop, loop from 1 to the ending point (inclusive) and perform the following statements:
If the number is only divisible by 3, print "Fizz"
If the number is only divisible by 5, print "Buzz"
If the number is divisible by both 3 and 5, print "FizzBuzz"
If nothing is true in the previous conditions, skip the number
Our speakers use 200 mA of current at maximum volume. The voltage is 12V. The current is used to produce a magnet which is used to move the speaker cone. Find the resistance of the electromagnet.
What is the electric potential 15.0 cm from a point charge?
(a) Calculate the capacitance of a parallel-plate capacitor whose plates are 20 cm x 30 cm and are separated by a 1.0-mm air gap.
(b) what is the charge on each plate if a 12-V battery is connected across the two plates?
(c) What is the electric field between the plates?
Product of array Items
given an array integers,write JS program to get the product of the integers in the given array.
input
the input will be containing single line integers.
output
the output should be single line containing the product as shown in sample outputs.
input1
[1,2,3]
output1
[1 * 2 * 3 = 6]
input2
[-1, -2, -3]
output2
[-1*-2*-3 = -6]
Note: The Output should be displayed as [1 * 2 * 3 = 6]
"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++];
}
function main() {
let integers = JSON.parse(readLine());
/* Please do not modify anything above this line */
/* Write your code here and log the output */
}
Create an console application to book train tickets. Create a Passanger class with (Name, Age) and write a function called TicketBooking(no_of_tickets) that takes no.of tickets to be booked. If the no of tickets is > 2 per booking, raise an user defined exception, and print "cannot book more than 2 tickets". Else Print "Ticket Booked Successfully". Add a Test class to call TicketBooking method by accepting all required details.
Create a list of numbers consisting of your student number
and find any s
pecific number inside the list
,
you can use listsearch or binary
search
this list. Then do a sorting to sort the numbers in this list from
least to greatest.
Keep the
repetitive
numbers as it is.
NMIMS Global Access School for Continuing Education (NGA-SCE)
Course: E-Business
2. With the rapid evolution of technology and penetration of the technology enabled devices, e-businesses are gaining more and more prominence thereby generating sustainable revenue. Discuss the various revenue models and the associated issues for an e-business.
(10 Marks)
"I WANT FULL LONG ANSWER"