Hi, you haven't provided the programing language in which you need the code, I'll explain how to do it using Python, and you can follow the same logic to make a program in the programing language that you need.
Answer:
import math
def rectangle(perimeter, area):
l1_1 = (perimeter+math.sqrt((perimeter**2)-(16*area)))/4
l1_2 = (perimeter-math.sqrt((perimeter**2)-(16*area)))/4
l2_1 = area/l1_1
l2_2 = area/l1_2
print(l1_1,l2_1)
print(l1_2,l2_2)
if l1_1.is_integer() and l2_1.is_integer() and l1_1>0 and l2_1>0:
return(int(max(l1_1,l2_1)))
elif l1_2.is_integer() and l2_2.is_integer() and l1_2>0 and l2_2>0:
return(int(max(l1_2,l2_2)))
else:
return(None)
Explanation:
- We import math to make basic operations
- We define the rectangle function that receives perimeter and area
- We calculate one of the sides (l1_1) of the rectangle using the quadratic equation to solve 2h^2 - ph + 2a = 0
- We calculate the second root of the quadratic equation for the same side (l1_2)
- We calculate the second side of the rectangle using the first root on w = a/h
- We calculate the second side of the rectangle using the second root on w= a/h
- We verify that each component of the first result (l1_1, l2_1) is an integer (using the build-in method .is_integer) and greater than 0, if True we return the maximum value between them (using the max function) as w
- If the first pair of sides evaluate to False we check the second root of the equation and if they meet the specification we return the max value
- if all the if statements evaluate to false we return None to indicate that not positive or integer sides were found
Answer:
Airpods, there is ps5 coming out
Explanation:
Explanation:
Online Movie Ticket Booking System is a website to provide the customers facility to book tickets for a movie online and to gather information about the movies and theaters. Customer needs to register at the site to book tickets to the movie
Advantages of Online Booking Systems
Your business is open around the clock. ...
You can maximize reservations. ...
You get paid quicker. ...
You're not tied to a phone. ...
You can effortlessly up-sell add-ons. ...
It's easy to manage your calendar. ...
You get valuable insight about your business
<u>B. Microphone</u> helps Carol to use the speech recognition software.
<u>Explanation</u>:
A microphone is a hardware device which converts the sound waves in the air into electronic signals. The electrical signals are transferred to a recording medium. Four main types of microphones are as follows:
i) Cardioid
ii) Super cardioid
iii) Omni
iv) Figure 8
Handheld microphone can be used better with the home theater or a karaoke machine. The speech recognition software can be used with the help of microphone. Cabling problem can be avoided with the use of microphone, thus cable trip hazard can also be avoided.
Answer: The <u>Ordering Tag List </u>defines the numbering styles of lists in HTML pages.
<ol>
</ol>
Inside this tag, you have <li></li> which will contain individual lists.
For example:
<ol>
<li> This is my first point. </li>
<li> This is my second point. </li>
<li> This is my second point. </li>
</ol>
is displayed as:
1. This is my first point.
2. This is my second point.
3. This is my second point.
Read more on Brainly.com - brainly.com/question/9724249#readmore
Explanation: