There are 50 lighting lamps, numbered 1 to 50, on a car race track. Initially all lamps are off. 10 cars numbered from 1 to 10 complete the track on the race track one by one. So, after a car completes track, the next car stars completing the the track. When the car passes in front of the lamp, if the number of the lamp is exactly divided by the number of the car, the lighted lamp turns OFF and the dimed lamp is turned ON. Write the program that finds out and displays on the screen which lamps are ON and which lamps are OFF, after the tenth car comples the track. After 18 cars finish race track driving : Lanps that are ON : 149 11 12 13 14 15 17 18 19 20 21 23 27 29 31 35 37 41 42 43 44 47 Lanps that are 0FF : 235678 18 16 22 24 25 26 28 30 32 33 34 36 38 39 40 45 46 48 49 50
Q: There are two A, B players playing the game. Player A is angry with him, and player B is angry with…
A: Problem Explanation: If A adds 'a' to w in the first movement, B can add 'a' and form a string w =…
Q: There are two A, B players playing the game. Player A is angry with him, and player B is angry with…
A: Algorithm: Firstly take input for test cases Then take the input for the test cases values then we…
Q: In Banasthali, we feel like a family. Every festival is celebrated with great zeal and enthusiasm;…
A: Input-Output format: The first line contains a single integer 't' representing the number of test…
Q: The game of Chomp is played by two players. In this game, cookies are laid out on a rectangular…
A: ANSWER:-
Q: During Eid, it is a tradition for every father to give his children money to spend on entertainment.…
A: Input-Output Format: The first line of the input contains a single integer TT denoting the number…
Q: Suppose a punch recipe calls for a given amount of orange soda, measured in ounces. int amount = 32;…
A: The program computes the number of cans needed to store soda in it. Each can has 12 ounces capacity.…
Q: In a Chess match "a + b", each player has a clock which shows a minutes at the start and whenever a…
A: Solution :: Note: Programming language in not mentioned so doing in java In this question, we are…
Q: In column H, find women who are white or have over 12 years of school In column I, find women…
A: Here I have provided an image in step 2 were you can get your answer in Excel table.
Q: A student wants to find out his final grade.There are three quizzes worth 10 points each, a midterm…
A: #include <stdio.h>int main(){ int q1,q2,q3,mid_term,final; float…
Q: Let p be the statement "I fix my car," q be the statement "I will be able to sleep," and r be the…
A: Given statement, , and whether the statement "Either I fix my car or I will not be able to sleep,…
Q: One hundred tickets, numbered 1, 2, 3, . . . , 100, are sold to 100 different people for a drawing.…
A: I have answered the question with proper explanation in step 2.
Q: During Eid, it is a tradition for every father to give his children money to spend on entertainment.…
A: Input-Output Format: The first line of the input contains a single integer TT denoting the number…
Q: The seller has a whole new store for sale "buy 2, get 1 for free". For legal reasons, they are…
A: In this question we are asked to write a program that calculate all the prices and programming…
Q: In this question we will design a vending machine with some fictitious coins. Assume the vending…
A: Given question has asked to design a vending machine with given input and output and also asked to…
Q: A project currently underway at Chemical Labs, Inc requires that a substance be continued ally…
A: Answer python program import time def main():on_flag = True # set the thermostat flag True means…
Q: In geometry, a hexagon is also a type of polygon with 6 sides. If the hexagon is regular, then the…
A: Algorithm: Start Create a class named Hexagon with 'a' as its attribute Implement constructor to…
Q: During Eid, it is a tradition for every father to give his children money to spend on entertainment.…
A: The above question is solved in step 2 :-
Q: A high school has 1000 students and 1000 lockers, one locker for each student. On the first day of…
A: The program is written in Java. Check the program screenshot for the correct indentation. Please…
Q: The squirrels in Palo Alto spend most of the day playing. In particular, they play if the…
A: As programming language is not mentioned we are providing solution in python
Q: In freshman chemistry, the relationship between moles and mass is introduced: n%3D MW where n=…
A: The answer is given below:-
Q: Suppose you are a participant in a game show. You have a chance to win a motorbike. You are asked to…
A: ANSWER: GIVEN THAT: Total number of doors = 500 doors open by host = 480 door open by participate =…
Q: Let P: If Tom whistle, Jerry shoot the Ball.; Q: If Tom eat bread, Jerry will leave the game. Now if…
A: As only P is true and Q is false, Then Jerry shoot the ball when Tom whistle is true also also as Q…
Q: Given that all the dishes served at the party are infinite in number, (Kuldeep doesn't want any of…
A: Program structure Import required packages in the program. Create the Main class Create static…
Q: (a) Create a digraph whose vertex set consists of three-digit binary sequences. From each vertex…
A: (a) Create a digraph whose vertex set consists of three-digit binary sequences. Fromeach vertex…
Q: Raghu and Sayan both like to eat (a lot) but since they are also looking after their health, they…
A: To do: Code
Q: Bianca is preparing special dishes for her daughter’s birthday. It takes her a minutes to prepare…
A: programming language is not mentioned we are giving solution in c++
Q: Alex is playing Poker card game. He starts with a deck of N cards, where for each valid (i), the ith…
A: Given:
Q: 12:45 • 440 + SP.pdf |13 24 2 46 5. In the game of blackjack the cards 2 through 10 are counted at…
A: program
Q: he seller has a whole new store for sale "buy 2, get 1 for free". or legal reasons, they are unable…
A: import java.util.ArrayList; import java.util.List; import java.util.Scanner; import…
Q: f the truth value of A v B is true, then truth value of ~A^B can be
A:
Q: In a Chess match "a + b", each player has a clock which shows a minutes at the start and whenever a…
A: Note: Programming language in not mentioned so doing in java In this question, we are asked to write…
Q: Qty: X Machine A Total? Current Sol A Sol B Machine B Qty: 1 Machine A takes in X units of solution…
A: Answer: I have done code and also I have attached code as well as code screenshot and output
Q: Suppose we have a nice young couple who borrow $700000 from the bank, at an annual interest rate of…
A: monthly.payment<-2000 im<-(1+3.124/100)^(1/12) # annual interest is in percentage convert into…
Q: A high school has 1000 students and 1000 lockers, one locker for each student. On the first day of…
A: A nested loop is used to further process iteratively for every value of the outer loop. Nested…
Q: Indian cricket team Players at an winning celebration dine at a circular table on which there is a…
A: According to the question, In part (a) Write a class called Fork with two public methods, ForkpickUp…
Q: 2. You have to design a vending machine for a 4 Tk product. The vending machine can only accept…
A: It is defined as a interpreted, object-oriented, high-level programming language with dynamic…
Q: A chemistry teacher asked her class to answer the following question: If I put 10 bacteria on the…
A: EXPLANATION: - The numBacterialAlive method computes the total number of bacteria alive after N…
Q: Let P(X) = “x lives in Los Angeles” and the u.d. for x is all students at Cinema Club. a. Translate…
A: a. ∃x(C(x)∧L(x)) b. ∀x(C(x)→¬L(x))
Q: Alex is playing Poker card game. He starts with a deck of N cards, where for each valid (i), the ith…
A: Given:
Q: Mr. Naughty loves to play with balls. So, his friend, Mr. Nice, gave him n balls to play the game.…
A: Process for the code The first line contains a single integer n - the number of balls. Thefollowing…
Q: There is some bad news to be delivered, and X has taken on the dangerous mission. Nobody really…
A: This is a basic programming problem named "Jospehus Circle" Since they are asking the implementation…
Q: There are three financial aid counselors. If a student’s last initial is from A – H, let them know…
A: Solution - Programming language - C All necessary comments are included in program code. Program…
Q: For tax purpose an item may be depreciated over a period of several years. With the straight-line…
A: Actually, program is a executable software that runs on a computer.
Q: Introduction There is some bad news to be delivered, and X has taken on the dangerous mission.…
A: the answer is given below:-
Q: Q1\A) A paint company is trying to recycle unpopular paint colours by mixing them together to create…
A: Answer:
Q: Problem: Qty: X Machine A Total? Current Sol A Sol B Machine B Qty: 1 Machine A takes in X units of…
A: The answer as follows
Q: A project currently underway at Chemical Labs, Inc requires that a substance be continued ally…
A: Algorithm: Get this temperature.Repeat the subsequent steps as long because the temperature is…
Q: A high school has 1000 students and 1000 lockers, one locker for each student. On the first day of…
A: Q: Code the given problem
Step by step
Solved in 3 steps with 2 images
- There are N light bulbs numbered 1 to N, all kept off initially. There are also N persons who will toggle all the bulbs. The first person comes and toggles all the bulbs. The second person comes and toggles all even bulbs. The third person comes and toggles all multiples of 3. This process continues till all N persons pass. When N=16, only the bulbs 1,4,9, and 16 are on. When N=50, how many bulbs are on?A Rajesh teaches a cooking class. The course is attended by NN students, numbered 11 to NN. The cook must participate in the presence before each class, i.e. call out the names of the students one by one and indicate which students are present. Each student has a first and last name. To save time, Rajesh only wants to call up students' first names. However, if there are multiple students with the same first name, the Rajesh must call out the full names (first and last names) of all those students. For any student who does not share a first name with any other student, the cook can still only call that student's first name. Help the Rajesh decide for each student whether to call that student's full name or just their first name. Note: Please Answer in java language only. Input 1 1 hasan jaddouh Output hasanOne hundred tickets, numbered 1, 2, 3, . . . , 100, are sold to 100 different people for a drawing.Four different prizes are awarded, including a grand prize. How many ways are there to awardthe prizes if:a) the person holding ticket 35 wins the grand prize?b) the person holding ticket 64 wins one of the prizes?c) the person holding ticket 18 does not win a prize?d) the people holding tickets 30 and 50 both win prizes?
- A spinner with three equal sections is being used in a game. One section is labeled “0 points,” and two sections are labeled “2 points.” A player can decide not to spin the spinner and score 1 point. Each player gets one turn, and the player with the higher score wins; in case of a tie, the winner is decided by one flip of a fair coin. Alex takes his turn first. Eddie, knowing Alex’s score, takes his turn next. If both players use strategies that maximize their winning probabilities, what is the probability that Alex wins? a 1/3 b 1/2 c 2/3 d 4/9A fish-finder is a device used by anglers to find fish in a lake. If the fish-finder finds a fish, it will sound an alarm. It uses depth readings to determine whether to sound an alarm. For our purposes, the fish-finder will decide that a fish is swimming past if:there are four consecutive depth readings which form a strictly increasing sequence (such as 3 4 7 9) (which we will call "Fish Rising"), orthere are four consecutive depth readings which form a strictly decreasing sequence (such as 9 6 5 2) (which we will call "Fish Diving"), orthere are four consecutive depth readings which are identical (which we will call "Constant Depth").All other readings will be considered random noise or debris, which we will call "No Fish."Create a Python program called "fishfinder_firstname_lastname" that takes 1 input of string of 4 numbers separated with comma. Your program must display "Fish Rising", "Fish Diving.", "Fish At Constant Depth" or "No Fish".Example:30,10,20,20 Must display No…Control Loops: A high school 1000 students and 1000 lockers. The principal plays the following game: She asks dthe first student to open all the lockers. Shen then asks the second student to close all the even-numbered lockers. The third student is asked to check every third locker. If it is open, the student closes it; if it is closed, the student opens it. The remaining students continue this game . In general, the nth student checks every nth locker. If the locker is open, the student closes it; if it is closed, the student opens it. After all the students have taken their turns, some of the lockers are open and some are closed. Write a program thatprompts the user to enter the number of lockers in a school. After the game is over, the program outputs the number of lockers and the locker numbers of the lockers that are open. Test run your program for the following inputs: 1000, 5000, 10,000. Do you see any pattern developing for the locker numbers that are open in the output?…
- There are four people who want to cross a rickety bridge; they all begin on the same side. You have 17 minutes to get them all across to the other side. It is night, and they have one flashlight. A maximum of two people can cross the bridge at one time. Any party that crosses, either one or two people, must have the flashlight with them. The flashlight must be walked back and forth; it cannot be thrown, for example. Person 1 takes 1 minute to cross the bridge, person 2 takes 2 minutes, person 3 takes 5 minutes, and person 4 takes 10 minutes. A pair must walk together at the rate of the slower person's pace. Write the specification of an algorithm that solves the problem.Bowling involves 10 frames. Each frame starts with 10 pins. The bowler has two throws to knock all 10 pins down. The total score is the sum of pins knocked down, with some special rules. For the first 9 frames: If all 10 pins are knocked down on a frame's first throw (a "strike"), that frame's score is the previous frame plus 10 plus the next two throws. (No second throw is taken). If all 10 pins are knocked down after a frame's second throw (a "spare"), that frame's score is the previous frame plus 10 plus the next throw. In the 10th frame, if the bowler's first throw is a strike, or the first two throws yields a spare, the bowler gets a third throw. The 10th frame's score is the previous frame's score plus the pins knocked down in the 10th frame's two or three throws. Given integers represents all throws for a game, output on one line each frame's score followed by a space (and end with a newline). Note that the number of throws may be as few as 11 (strikes in first 9 frames,…Bowling involves 10 frames. Each frame starts with 10 pins. The bowler has two throws to knock all 10 pins down. The total score is the sum of pins knocked down, with some special rules. For the first 9 frames: If all 10 pins are knocked down on a frame's first throw (a "strike"), that frame's score is the previous frame plus 10 plus the next two throws. (No second throw is taken). If all 10 pins are knocked down after a frame's second throw (a "spare"), that frame's score is the previous frame plus 10 plus the next throw. In the 10th frame, if the bowler's first throw is a strike, or the first two throws yields a spare, the bowler gets a third throw. The 10th frame's score is the previous frame's score plus the pins knocked down in the 10th frame's two or three throws. Given integers represents all throws for a game, output on one line each frame's score followed by a space (and end with a newline). Note that the number of throws may be as few as 11 (strikes in first 9 frames,…
- Bowling involves 10 frames. Each frame starts with 10 pins. The bowler has two throws to knock all 10 pins down. The total score is the sum of pins knocked down, with some special rules. For the first 9 frames: If all 10 pins are knocked down on a frame's first throw (a "strike"), that frame's score is the previous frame plus 10 plus the next two throws. (No second throw is taken). If all 10 pins are knocked down after a frame's second throw (a "spare"), that frame's score is the previous frame plus 10 plus the next throw. In the 10th frame, if the bowler's first throw is a strike, or the first two throws yields a spare, the bowler gets a third throw. The 10th frame's score is the previous frame's score plus the pins knocked down in the 10th frame's two or three throws. Given integers represents all throws for a game, output on one line each frame's score followed by a space (and end with a newline). Note that the number of throws may be as few as 11 (strikes in first 9 frames,…Three prisoners have been sentenced to long terms in prison, but due to over crowed conditions, one prisoner must be released. The warden devises a scheme to determine which prisoner is to be released. He tells the prisoners that he will blindfold them and then paint a red dot or blue dot on each forehead. After he paints the dots, he will remove the blindfolds, and a prisoner should raise his hand if he sees at least one red dot on the other two prisoners. The first prisoner to identify the color of the dot on his own forehead will be release. Of course, the prisoners agree to this. (What do they have to lose?) The warden blindfolds the prisoners, as promised, and then paints a red dot on the foreheads of all three prisoners. He removes the blindfolds and, since each prisoner sees a red dot (in fact two red dots), each prisoner raises his hand. Some time passes when one of the prisoners exclaims, "I know what color my dot is! It's red!" This prisoner is then released. Your problem…Interest on a credit card’s unpaid balance is calculated using the average daily balance. Suppose that netBalance is the balance shown in the bill, payment is the payment made, d1 is the number of days in the billing cycle, and d2 is the number of days payment is made before billing cycle. Then, the average daily balance is: averageDailyBalance =netBalance x d1-payment x d2d1 If the interest rate per month is, say, 0.0152, then the interest on the unpaid balance is: Interest= averageDailyBalance * 0.0152 Write a program using c++ compiler that accepts as inputnetBalance, payment, d1,d2, and interest rate per month. The program outputs the interest. Format your output to two decimal places.