Answer:
Explanation:
Well here you only have to add 2 new horses .... so simply what you can do is find 2 slots where the gap is maximum ... lets take the given example in detail to understand the same.... here 10001001000010 here you can observe that the difference between the first two filled slots is 3 then 2 then 4 then 1....... make it a separate array ...... now as i said that we just need to place two new horses so we just need two of the biggest numbers from this array and place the new horses at the center of the corresponding slots ... like here 3 and 4 are greatest ... so one horse is placed in between the gap corresponding to 3 while other at 4 ..... after making the new array answer can be find in linear time itself... I hope this makes sense ....
Now lets understand how to program it easily so firstly after scanning all stuff ..... we will make a gap array .... then just think now what we will do is find the greatest two numbers then again putting the horses and then find our answers .... so now an easy approach is that instead of making the string again and again searching for answer .... what we do is just do half of the two greatest ones and again find the greatest one in array....
Answer:
I believe its a statement
Explanation:
Solution :
'AND" operation is a logical operation and is used in logical connective combining two statements and in truth tables.
Using AND operation verifies whether the outcome P and Q is true only when both the P as well as Q are true. If one of the P or Q is not true, then outcome result will be false.
In the context, Kamal wishes to offer a new and more favorable contracts to the business customers who use a wireless services and receive a discount.
Therefore, using the AND operation of the customers as :
Customer Wireless Discount Outcome
A N N FALSE
B Y N FALSE
C N Y FALSE
D Y Y TRUE
Answer:
Replace the power supply
Explanation:
Usually, Capacitors burn up because of different factors.
- Exceeding operation voltage
- High Inverse voltage if is an electrolytic capacitor.
A tentative answer could be the battery, but usually the batteries damages are because wear out of them, that is, cycles of charging and discharging, a problem that could arise in the battery is related with the charge protection, this circuit cares that the battery only get the charge that it needs, in Li-po batteries is 3.7V, in some laptops is 24 V, if so the battery could explode or leaking acid.
The mother-board is the "brain" and the Random Access Memory (RAM), they consume a lot of energy and usually heat up, but doesn’t produce increasing of voltage and its feed it by voltage regulators.
The only valid option is the power supply because the energy comes from a rectifier (made with diodes) and a voltage regulator that step-down the DC voltage output if by any chance the voltage increase or a diode burns up in the power supply the coupling capacitors or input capacitors in the computer will fail.
Answer:
// program in Python to check perfect number
#function to find number is perfect or not
def is_Perfect_Number(n):
#total variable
tot = 1
i = 2
#sum of all divisor of number
while i*i<=n:
if n%i==0:
tot = tot + i + n/i
if tot == n and n != 1:
return 1
i = i+1
return 0
#read until user enter a perfect number
while True:
#read integer
num = int(input("Input an integer: "))
#call the function
if(is_Perfect_Number(num)):
print(num,"is perfect number")
#if perfect number break
break
else:
print(num,"is not a perfect number")
#ask again
print("try again.")
Explanation:
Read number from user and then call the function is_Perfect_Number() with parameter "num".This will find the sum of all divisor of number.If sum is equal to number then it will return 1 else return 0.If the number is not perfect then it will again ask to enter a number until user enter a perfect number.
Output:
Input an integer: 24
24 is not a perfect number
try again.
Input an integer: 28
28 is perfect number