1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Ira Lisetskai [31]
3 years ago
6

Create a new project called 02.03 Math Class Methods. Create a class called PyTheorem in the newly-created folder. Use the appro

priate Math class methods to calculate the hypotenuse of two right triangles. The value of each side (sides a and b) should be randomly generated using Math.random(). The range should from 5 (inclusive) to 23 (exclusive). Print the value of each side of both triangles as well as the value of the hypotenuse for both triangles.
Mathematics
1 answer:
SashulF [63]3 years ago
6 0

Answer:

The program in Java is as follows:

import java.util.*;

public class PyTheorem{

   public static void main(String [] args){

       Random rNum = new Random();

       int a = rNum.nextInt(17) + 5;

       int b = rNum.nextInt(17) + 5;

       System.out.println("a: "+a);

       System.out.println("b: "+b);

       double hyp = Math.sqrt(Math.pow(a,2)+Math.pow(b,2));

       System.out.print("Hypotenuse: "+hyp);

   }}

Step-by-step explanation:

This generates random number for a

       int a = rNum.nextInt(17) + 5;

This generates random number for b

       int b = rNum.nextInt(17) + 5;

Print a

       System.out.println("a: "+a);

Print b

       System.out.println("b: "+b);

Calculate the hypotenuse

       double hyp = Math.sqrt(Math.pow(a,2)+Math.pow(b,2));

Print the calculated hypotenuse

       System.out.print("Hypotenuse: "+hyp);

You might be interested in
Por favor resuelva este problema con sustitución.
madam [21]

Answer:

x - 2y - 5= 0

i think is the answer for number 1 i hope it is

5 0
2 years ago
Can someone help me thankyou <3
grigory [225]

Answer:

P(G)= 7/10

B, 1, P(not B)

1- 8/10, p(Y)= 2/10

Step-by-step explanation:

hope this helps

correct me if this is wrong

6 0
3 years ago
For what values of θ on the polar curve r=θ, with 0≤θ≤2π , are the tangent lines horizontal? Vertical?
Bond [772]
Given that r=\theta, then r'=1

The slope of a tangent line in the polar coordinate is given by:

m= \frac{r'\sin\theta+r\cos\theta}{r'\cos\theta-r\sin\theta}

Thus, we have:

m= \frac{\sin\theta+\theta\cos\theta}{\cos\theta-\theta\sin\theta}



Part A:

For horizontal tangent lines, m = 0.

Thus, we have:

\sin\theta+\theta\cos\theta=0 \\  \\ \theta\cos\theta=-\sin\theta \\  \\ \theta=- \frac{\sin\theta}{\cos\theta} =-\tan\theta

Therefore, the <span>values of θ on the polar curve r = θ, with 0 ≤ θ ≤ 2π, such that the tangent lines are horizontal are:

</span><span>θ = 0

</span>θ = <span>2.02875783811043
</span>
θ = <span>4.91318043943488



Part B:

For vertical tangent lines, \frac{1}{m} =0

Thus, we have:

\cos\theta-\theta\sin\theta=0 \\  \\ \Rightarrow\theta\sin\theta=\cos\theta \\  \\ \Rightarrow\theta= \frac{\cos\theta}{\sin\theta} =\sec\theta

</span>Therefore, the <span>values of θ on the polar curve r = θ, with 0 ≤ θ ≤ 2π, such that the tangent lines are vertical are:

</span>θ = <span>4.91718592528713</span>
3 0
3 years ago
Which choice number is the answer?
Luden [163]
The answer will be (2) 0 and 9
X^2(x-9)
X=0, and 9
3 0
3 years ago
Help me please on this
amid [387]
I do believe the answer is 52, sorry if i’m incorrect
4 0
2 years ago
Other questions:
  • The screen in a theatre is 22 ft high and is positioned 10 ft above the floor, which is flat. The first row of seats is 7 ft fro
    10·1 answer
  • In the diagram below, AB is parallel to CD . What is the value of y?
    10·1 answer
  • What is one possible dividend, greater than 1000, if quotient is37 R4
    11·1 answer
  • What is 4 + 15 × 7 =
    8·2 answers
  • A company manufactures and sells video games. A survey of video game stores indicated that at a price of $73 each, the demand
    14·1 answer
  • The perimeter a rectangle is 46 in if the width of the rectangle is 9 inches what is the length ​
    5·1 answer
  • What is the distance between the points<br> (7, 8) and (-8, 0) on a coordinate grid?
    14·1 answer
  • I need help pleaseee
    14·1 answer
  • A sample of 12 cars was taken, and the horsepower to miles per gallon was recorded. The computer output for regression is below:
    13·2 answers
  • A comedy club in New York City spent $4,250 to produce their first major show of the season. Tickets for the show will sell at $
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!