Answer:
a) 31% b) 48% c) 31%
Explanation:
We have the probabilities:
P(had TV) = 0.52
P(had refrigerator)=0.38
P(had both a TV and a refrigerator)=0.21
<em>a) a TV but no refrigerator </em>
P(a TV but no refrigerator) =P(TV)- P(both a TV and a refrigerator) = 0.52 - 0.21 = 0.31
<em>(b) a TV or refrigerator but not both </em>
P(a TV or refrigerator but not both) = P(TV) + P(had refrigerator) - 2×P(had both a TV and a refrigerator) = 0.52+ 0.38 - (2×0.21) = 0.48
<em>(c) neither a TV nor a refrigerator</em>
P(neither a TV nor a refrigerator) = 1 - ( P(TV) + P(had refrigerator) - P(had both a TV and a refrigerator) ) = 1- (0.52 + 0.38 - 0.21) = 0.31
<em></em>
The programmers should keep lines of code short because It makes the code more readable by other programmers.
<h3>
Short lines of Code</h3>
Normally, a shorter lines of code are more efficient than spreading the code over several lines
Also, If a programmer have more lines of code, there are more places for bugs to hide and finding them might be more of a hassle.
So, the fewer lines of code can achieve the same results or much better than many lines of code
Hence, the programmers should keep lines of code short because It makes the code more readable by other programmers.
Therefore, the Option A is correct.
Read more about Short lines of Code
<em>brainly.com/question/20475581</em>
B copy the web page of the video that you want to use
Answer:
Volume of a Cuboid = Length * Breadth * Height.
Volume of a Cuboid = lbh.
The Lateral Surface Area of a Cuboid = 2h (l + w)
Explanation:
Answer:
Explanation:
The Rectangle and Point class is not provided in this question but was found online. Using that code as guidance I created the following method named contains. This method takes in a Point object and checks to see if the x-axis point is inside the parameters of the Rectangle class and then checks the same for the y-axis. If it is inside the Rectangle then the method returns true otherwise it returns false.
def contains(self, point):
return self.width > point.x >= self.corner.x and self.height > point.y >= self.corner.y