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
No, this website is not for study groups. It's more of a 'question and answer' website. There is no actual communication on one certain subject. Although I do know a few websites that have worked really well for me,where you can create and participate in study groups;
-studyblue
- studyhall
- getstudyroom
all of these are safe websites that are used by wide variety of students, therefore i'm sure you can find plenty of people interested in learning the same things as you!
Answer:
modifiers
Explanation:
The modifiers are the change that is minor with respect to the objects that have an impact at the render time
Therefore as per the given situation, the last option is correct as it fits to the current scenario
And, the rest of the options would be incorrect
The same is to be considered and relevant
Hence, the modifier is the correct option
It was not. Movies then talking movies were before television.
Java script same origin defense restricts a JavaScript downloaded from Site A from accessing data that came from Site B.
<h3>Defenses and Browser Vulnerabilities</h3>
Java script sandboxing defense JavaScript to run in a restricted environment ("sandbox") and limit the computer resources it can access or actions it can take.
Java script same origin defense restricts a JavaScript downloaded from Site A from accessing data that came from Site B.
Java script limit capabilities restrict JavaScript to not support certain capabilities.
Find out more on browser vulnerability at: brainly.com/question/18088367