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
Margarita [4]
3 years ago
10

JAVA CHALLENGE ZYBOOKs

Computers and Technology
1 answer:
exis [7]3 years ago
5 0

Answer:

Replace  /* Your solution goes here */ with:

<em>System.out.println(randGen.nextInt(49) + 100);</em>

<em>System.out.println(randGen.nextInt(49) + 100);</em>

<em />

Explanation:

Required

Statements to print two random numbers between 100 and 149 (both inclusive)

First, the random numbers must be generated. From the template given, the random object, randGen, has been created.

The syntax to then follow to generate between the interval is:

<em>randGen.nextInt(high-low) + low;</em>

Where:

high = 149 and low = 100

So, the statement becomes:

<em>randGen.nextInt(149 - 100) + 100;</em>

<em>randGen.nextInt(49) + 100;</em>

<em />

Lastly, print the statements:

<em>System.out.println(randGen.nextInt(49) + 100);</em>

<em>System.out.println(randGen.nextInt(49) + 100);</em>

<em />

You might be interested in
Technology trends in education play a key role in a student’s: social life. motivation. career readiness. job search.
skelet666 [1.2K]

Answer:

job search

Explanation:

job search bc you can look for jobs that are avalible online.

4 0
3 years ago
Read 2 more answers
Given the lists list1 and list2, not necessarily of the same length, create a new list consisting of alternating elements of lis
tester [92]

Answer:

The following code is written in Python Programming Language.

Program:

list1=[1,2,3]

 # initialized the list type variable

list2=[4,5,6,7,8]

  # initialized the list type variable

list3=[]

   # initialized the empty list type variable

for j in range(max(len(list1), len(list2))):   #set for loop

 if j<len(list1):

  #set if statement

   list3.append(list1[j])

  #value of list1 appends in list3  

 if j<len(list2):

   #set if statement

   list3.append(list2[j])

  #value of list2 append in list3

print(list3)    #print the list of list3

Output:

[1, 4, 2, 5, 3, 6, 7, 8]

Explanation:

Here, we define three list type variables "list1", "list2", "list3" and we assign value in only first two variables "list1" to [1, 2, 3] and "list2" to [4, 5, 6, 7, 8] and third list is empty.

Then, we set the for loop and pass the condition inside it we pass two if conditions, in first one we compare the list1 from variable "j" inside it the value in list1 will append in list3, and in second one we compare "j" with list two and follow the same process.

After all, we print the list of the variable "list3".

5 0
3 years ago
To save a document with a new name, click _______ in the navigation bar and enter a new filename.
cricket20 [7]
Click the save as button
3 0
4 years ago
The query [windows], English (US) has two dominant interpretations: the operating system and the windows in a home
Nadusha1986 [10]

Answer:

True

Explanation:

When the word windows is google, there are two basic interpretations: operating system and the windows in a home. This is the two dominant interpretation can be given to the word windows when queried.

6 0
3 years ago
What type would the object X be in the following statement:
Y_Kistochka [10]

Answer:

Boolean

Explanation:

If statement condition always returns true or false,which is a boolean data type.

X is true or false

it maybe a variable or an expression.

5 0
3 years ago
Read 2 more answers
Other questions:
  • Why do astronomers prefer to use the reflecting telescope rather than the refracting telescope to view distant objects in space?
    15·2 answers
  • What to buy instead of the hp chromebook 13
    15·1 answer
  • A web page typically contains ________, which contains the formatting instructions for displaying the web page.
    7·1 answer
  • Linux is: Select one: a. primarily concerned with the tasks of end users. b. designed for specific machines and specific micropr
    10·1 answer
  • The Windows taskbar is generally found _____. at the top of the screen in the Start menu at the bottom of the screen at the righ
    14·2 answers
  • Javier develops sophisticated fashion websites. He has been asked by the owner of a leading fashion brand to create web content
    13·1 answer
  • Giải thích mục đích của các thao tác open() và close().
    6·2 answers
  • Insertion point shows where the typed text will appear.
    5·1 answer
  • All Office programs have similar commands on the tab for changing the document view a. File b. View c. Locate d. display ​
    5·1 answer
  • Why should we apply print preview before printing the document.​
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!