Which of the following statements assigns a random integer between 1 and 10, inclusive, to rn ?
A int rn = (int) (Math.random()) * 10;
B int rn = (int) (Math.random()) * 10 + 1;
C int rn = (int) (Math.random() * 10);
D int rn = (int) (Math.random() * 10) + 1;
E int rn = (int) (Math.random() + 1) * 10;

Answers

Answer 1

The correct statement that assigns a random integer between 1 and 10, inclusive, to rn is (D).

int rn = (int) (Math.random() * 10) + 1.

The method Math.random() generates a random number between 0 and 1, inclusive. If we multiply this number by 10, we will get a random number between 0 and 10, exclusive. If we then add 1 to this number, we will get a random number between 1 and 11, exclusive. If we then take the integer part of this number using the (int) cast, we will get a random integer between 1 and 10, inclusive. This is exactly what statement (D) does.

Learn more about Math.random() here:

https://brainly.com/question/29644825

#SPJ4


Related Questions

What are vertical angles? If ZA and ZB are vertical angles, what is true about their
measures?

Answers

Answer:

45 i think

Step-by-step explanation:

[tex]\huge{ \mathbf{  \underline{ Answer }\:  \:  ✓ }}[/tex]

Vertical Angles are pair of two angles opposite to each other formed by two lines intersecting each other. And they have equal measures.

So, if [tex]\angle A[/tex]\angle B[tex][/tex] are vertical angles then they have equal measures .

[tex] \large\boxed{ \angle A = \angle B}[/tex]

_____________________________

[tex]\mathrm{ \#TeeNForeveR}[/tex]

The FBI wants to determine the effectiveness of their 10 Most Wanted list. To do so, they need to find out the fraction of people who appear on the list that are actually caught. Step 1 of 2: Suppose a sample of 1453 suspected criminals is drawn. Of these people, 377 were captured. Using the data, estimate the proportion of people who were caught after being on the 10 Most Wanted list. Enter your answer as a fraction or a decimal number rounded to three decimal places.

Answers

Answer:

The proportion of people who were caught after being on the 10 Most Wanted list is 0.259.

Step-by-step explanation:

Proportion of people who were caught after being on the 10 Most Wanted list.

Number of people caught divided by the size of the sample.

In this question:

377 people caught.

1453 suspected criminals.

Then

[tex]p = \frac{377}{1453} = 0.259[/tex]

The proportion of people who were caught after being on the 10 Most Wanted list is 0.259.

What is the product of (6a + 7) (5a – 4)?

Answers

Answer:

30a²+11a−28

Step-by-step explanation:

(6a+7)(5a−4)

=(6a+7)(5a+−4)

=(6a)(5a) + (6a)(−4) + (7)(5a) + (7)(−4)

=30a² − 24a + 35a − 28

=30a² + 11a − 28

Hope I helped! (p.s. maybe brainliest answer)

This is ur answer in the picture below

ON Answe
a. Without using mathematical table or calculator, simplify.
1271​

Answers

Answer:

Step-by-step explanation:

1271 = 31 *41

31 and 41 are prime number.

HELPPPPPPP PLEASEEEEE​ WILL GIVE BRAINLEST

Answers

x:35 y: 7,3
So thats the answer for your MATCHEMATIC QUESTIONSS

It is believed that GPA (grade point average, based on a four point scale) should have a positive linear relationship with ACT scores. The Excel output from regressing GPA on ACT scores using a data set of 8 randomly chosen students from a Big Ten university gives R Square = 0.5774 The interpretation of the coefficient of determination in this regression is that

Answers

Options :

B) ACT scores account for 57.74% of the total fluctuation in GPA.

B) ACT scores account for 57.74% of the total fluctuation in GPA.

C) GPA accounts for 57.74% of the variability of ACT scores.

D) None of the above.

Answer:

B) ACT scores account for 57.74% of the total fluctuation in GPA.

Step-by-step explanation:

The R-squared value, called the Coefficient of determination gives the percentage or proportion of variation in the dependent variable which is due to or caused by the independent variable.

In the study above, the independent variable is the ACT score, is used to draw a regression relationship between the GPA of students, with GPA being the dependent variable.

The R² :value being 0.5774 means that (0.5774 * 100%) = 57. 74 % of variation in students GPA is caused by the regression line (independent variable which is the ACT SCORE).

HENCE, we can conclude that ACT Score is responsible of 57. 74 % variation in GPA while the remaining percentage is due to other factors.

Which table shows ordered pairs that satisfy the function y = x + 1?
А
X
12
0
2
- 4
1
4
B
-2
0
2
5
0
5
С
X
y
5
-2
0
2.
1
5
D
x
y
-24
0 2
2 4

Answers

Answer:

Knowledge Check The table of ordered pairs (x, y) gives an exponential function. Write an equation for the function. x y -1 6 0 12 1 1 24 2. 48 88 O х ? I Don't ...

Step-by-step explanation:

Which statement is true?


CLEAR CHECK

All whole numbers are rational numbers.


All integers are whole numbers.


All rational numbers are integers.


None of the above

Answers

Answer:

c

Step-by-step explanation:

that's the answer sjakskkeieiidix

The value of an autographed baseball card increased from $39 to $65 what is the percent increase in value of the baseball card?

Answers

:

The percent increase is found by finding the difference between the two prices and then dividing that different by the beginning price.

For this example it would be 65-39= $26. So $26/$39(the starting price) is 0.666... This is equivalent to about 66.67%. So, the price of the card increased by about 66.67%

Answer:

66.7%

Step-by-step explanation:

the value increased by 26

percentage increase =increase /initial value ×100

=26/39×100=66.7%

Consider the equation below.



Determine which equation has the same solutions as the given equation.

Answers

Answer:

B, (x-5) square =21

Step-by-step explanation:

B, (x-5)square =21

Circle P has a circumference of approximately 75
inches.
What is the approximate length of the radius, r? Use 3.14
for y. Round to the nearest inch,
12 inches
D24 inches
38 inches
46 inches

Answers

Answer:

12 in

Step-by-step explanation:

C=2pi *r

75/2(3.14)=r

r=75/6.28

~11.94~12 inches

if my answer helps please mark as brainliest

Answer:

12 in

Step-by-step explanation:

Circumference:

C = 2πr

75 = 2(3.14)r

75 = 6.28r

r = 75/6.28

r = 11.95 ≈ 12

What is 5.5 divided by 1.68
WITH STEP BY STEP EXPLANATION

Answers

=3.273

Steps:
Use a calculator
Press on 5.5
Then press the division sign
Press 1.68
Then press =

SOMEONE PLEASE HELP ME ASAP IM SO TIRED PLEASE JUST HELP ME ON THIS ONE QUESTION AND EXPLAIN YOUR ANSWER GOD

In 1985 an antique automobile club had 23,000 members. Since then its membership has grown at an average rate of 5% per year. Assuming this trend continues, how many members will there be in 2020? Round to the nearest thousand.
a) 112,000 members
b) 78,000 members
c) 151,000 members
d) 127,000 members

Answers

D.). 127,000 members

A company that manufactuers small canoes has a fixed cost of $14,000. It cost $40 to produce each canoe. The selling price is $80 per canoe

Answers

Answer:

The company manufactures about 350 canoes, obtaining $ 28,000 after selling them all.

Step-by-step explanation:

Given that a company that manufactures small canoes has a fixed cost of $ 14,000, and it cost $ 40 to produce each canoe while the selling price is $ 80 per canoe, to determine the number of canoes that the company produces and the amount of money it makes after selling them, the following calculation must be carried out:

14/000 / 40 = X

350 = X

350 x 80 = 28,000

Thus, the company manufactures about 350 canoes, obtaining $ 28,000 after selling them all.

A 5-pound bag of sugar costs $3.90. What is the unit rate?

Answers

0.78 per pound is unit rate

Since 5lbs is $3.90, 0.78 is the cost of one pound.

3.90 divided by 5 is 0.78

if 15 citizens are chosen, what is the probability that 10 of them are favoring the substation

Answers

Answer:

10/15

Step-by-step explanation:

The probability is 10/15 or 67% chance

Solve the problem.
The area of a square is 81 square centimeters. If the same amount is added to one dimension and removed from the other, the resulting
rectangle has an area 9 square centimeters less than the area of the square. How much is added and subtracted?
A. 3cm
B. 9cm
C. 12 cm
D. 4cm

Answers

Answer:

c

Step-by-step explanation:

PLZ HELP i rlly need it i am not good a t algebra

Evaluate the following expressions when x = 5. Show your work.
Hint: Remember to use BEDMAS

My question: 2x+3

Answers

Answer:

13

Step-by-step explanation:

substitute the five into the equation. :)

The refrigerator part of a refrigerator-freezer has a volume of 27 cubic feet.
The freezer part is 2 feet high, 2 feet deep and 3 feet wide.
What is the total volume of the refrigerator-freezer?

Answers

Answer:

39

Step-by-step explanation:

The population of a city is 100,000 and the annual growth rate is 4.2%. Write an equation to model the population y​ after x​ years.

Answers

Answer:4.2 times every 100000y=420000x for every year)

Step-by-step explanation:

Sketch a graph of X= –2

Answers

Answer:

It's just a vertical line extending in both directions for infinity at x=-2

Step-by-step explanation:

Graph is in ss

Is this correct? Pls help me

Answers

Answer:

I Belive so

Step-by-step explanation:

Find the value of x.

Answers

Answer:

Not exactly sure if this is right.

I am pretty sure that 10 and x-3 are like congruent angles.

So x - 3 = 10

Add 3 to both sides.

x = 13.

Hope this helps!

please answer this thanks

Answers

Answer:

try using an online calculator, it might help

I need help with this question ​

Answers

Answer:

14x+4 = 4x+44

14x - 4x = 44 - 4

10x = 40 ...... x = 4

《60°》.....

5y = 120

y = 120/5 => y = 24

Angle B=14x+4
Angle D=4x+44
14x+4=4x+44
14x-4x=44-4
10x=40
x=4
Angle B=14•4+4=60
Angle D=4•4+44=60
Angle C=180-60
Angle C=120
5y=120
y=24
Angle C=24
Angle A=24

Consider the figure below in which 411122.
a b
cld
4
elf
12
gh
Select the angle(s) that are congruent to Zc.


Options

Answers

Answer:

its a and d

Step-by-step explanation:

shown below are the statements and reasons to the proof. they are not in correct order. which of these is the most logical order for the statements​

Answers

Answer:

Answer is B

Step-by-step explanation:

I just did it.

Answer:

b

Step-by-step explanation:

I know because of the kid above this

Which would be the best trend line for the given data set?
A) y=x+4
B) y=-x+4
C) y=-1/4x+2
D) 1/4x+2

Answers

I believe the correct answer would be a if it’s not remove my answer
I think it’s c. Since slope is decreasing

The overall distance traveled by a golf ball is tested by hitting the ball with Iron Byron, a mechanical golfer with a swing that is said to emulate the legendary champion, Byron Nelson. Ten randomly selected balls of two brands are tested and the overall distance measured. Assume the data are normally distributed. The data follow:
Brand 1 257 276 260 262 287 271 260 265 283 271
Brand 2 273 281 279 275 271 270 263 267 263 268
1) Is there evidence to show that there is a difference in the mean overall distance of brands? Use alpha = 0.05.
2) Calculate a 95% two-sided confidence interval on the difference in mean overall distance.

Answers

Answer:

1) Since the calculated value of t = -0.241640 does not fall in the critical region so we accept H0 and conclude that there is not enough evidence to show the difference in the mean overall distance of brands.

2) The 95% CI  is [-18.587; 1.01242]

Step-by-step explanation:

The given data is

Brand 1     257      276     260   262   287   271    260  265   283     271

Brand 2     273     281      279    275   271    270   263   267   263    268

Difference d -16   -5       -19       -13     -16    - 01       -3     -2      20     3 ∑ -98

d²               256     25     361      169    256     1     9      4     400      9 ∑1490

1) Let the hypotheses be

H0: ud= 0 against the claim Ha: ud ≠0

2) The degrees of freedom = n-1= 10-1= 9

3) The significance level is 0.05

4) The test statistic is

t= d`/sd/√n

5) The critical region is ║t║≤ t (0.025,9) = ±2.262

Calculations

6) d`= ∑di/n= -98/10= -9.8

Sd²= ∑(di-d`)²/n-1 = 1/n-1 [∑di²- (∑di)²n]

= 1/9[1490-(-9.8)²/10] =1/9 [1490-9.604]= 164.4884

Sd= 12.825

Therefore

t= d`/ sd/√n

t= -9.8/ 12.825/√10

t= -0.764132/3.16227= -0.241640

7) Conclusion:

1) Since the calculated value of t = -0.241640 does not fall in the critical region so we accept H0 and conclude that there is not enough evidence to show the difference in the mean overall distance of brands.

2) The confidence interval for the difference of two samples can be calculated by

d ` ± td sd/√n

Putting the values

-9.8 ±2.262* 12.825/√10

[-18.587; 1.01242]

please answer asap! no scam links or scam comments or reported.

Answers

Answer:

B

Step-by-step explanation:

Other Questions
FIOS is the latest technology for connecting to the Internet True False What are the main ideas that the Enlightenment was trying to address? Allocation of resources is inefficient only if O a. producer surplus is zero. O b. some of the potential gains from trade among buyers are sellers are not being realized. O c.consumer surplus is equal to producer surplus. O d. consumer surplus is lower than producer surplus. Can humans survive with carbon dioxide? during inhalation, the diaphragm and intercostal muscles contract, which_____pressure in the thoracic cavity, and air flows into the body. 2. When water flows over limestone, is dissolved, creating hard water. O sodium O chlorine O carbon O calcium What are the 3 types of scarcity? Is greater than minimal risk research allowed to include pregnant women? Nancy is making accessories for the soccer team. She uses 866.18 inches of fabric on headbands for 43 players and 3 coaches. She also uses 378.83 inches of fabric on wristbands for just the players. How much fabric was used on a headband and wristband for each player? Which polynomial function could be represented by the graph below? In order to react particles must be in the correct what ? If tertiary consumers have a total of 5 kcals, how much total energy would the producers have?. What idea did the scientific revolution popularized? please help me with stoichiometry The question is in the picture below :) How do I solve a whole number and a fraction? What is a tax or duty to be paid on a particular class of imports or exports? Why is 2 a prime number? A mirror with a parabolic cross section is used to collect sunlight on a pipe located at the focus of the mirror. The pipe is located 9 inches from the vertex of the mirror. Write an equation of the parabola that models the cross section of the mirror. Assume that the parabola opens upward. a 0.32-m-long violin string is tuned to play a above middle c at 440 hz. (a) what is the wavelength of the fundamental string vibration, and (b) what are the frequency and wavelength of the sound wave produced? (c) why is there a difference?