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
elena-14-01-66 [18.8K]
3 years ago
11

Please help with coding assignment.

Computers and Technology
1 answer:
Inessa05 [86]3 years ago
4 0

Answer:

import java.util.Random;

class Main {

   

   public int stopAtFive (int j) {

      Random rand = new Random();

      int number = 0;

      for(int i=0; i<j; i++) {

          number = rand.nextInt(9)+1;

          System.out.println(number);

          if (number == 5) {

              System.out.println();

              break;

          }

      }

      return number;

   }

   

   public static void main(String args[]) {

       Main main = new Main();

       main.stopAtFive(20);

       main.stopAtFive(20);

   }

}

Explanation:

Your requirements do not say what has to be displayed or returned from the method, but you can use this as a starting point.

You might be interested in
__________ is a collection of formatting options—such as a frame, a rounded shape, and a shadow—that changes a picture’s overall
LenaWriter [7]

Answer:

Picture Style

Explanation:

According to my research on the Microsoft Word Software, I can say that based on the information provided within the question the term being mentioned in the question is called a Picture Style. This is a feature in Microsoft Word that allows you to apply a style or effect to a picture in order to enhance the way it looks or presents, such as a frame, shadow, or shape.

I hope this answered your question. If you have any more questions feel free to ask away at Brainly.

6 0
3 years ago
Please tell fast plzzzzz​
taurus [48]

Answer:

it can be anything from attachments/images or links

Explanation:

8 0
3 years ago
Read 2 more answers
Everyone holds some stereotypical attitudes.
lozanna [386]
The answer to your question is True.

Everyone holds some type of stereotypical attitudes, whether it's judging someone based on what they wear or how they look everyone has them. 

8 0
4 years ago
Read 2 more answers
(Print distinct numbers) Write a program that reads in integers separated by a space in one line and displays distinct numbers i
irina [24]

Answer:

Following are the program to the given question:

num = input("Enter numbers: ")#defining a variable num for input value  

list1 = num.split()#defining a list1 that adds value in list1  

list2 = []#defining an empty list list2

for j in range(len(list1)):#defining a for loop that checks the list value in range  

   if not list1[j] in list2:# use if block that checks multiple value

       list2.append(list1[j])#add value in list2

print("The distinct numbers are: ")#print message

for j in range(len(list2)):#defining for loop for print list value

   print(list2[j])#print list value

Output:

Enter numbers: 1 22 55 7 22 1 1 2 3

The distinct numbers are:  

1

22

55

7

2

3

Explanation:

In the above-code, a "num" variable is defined, that takes inputs from the console screen, and in the next step, "list1 and list2" is defined. In the "list1" it adds num variable value a into the list.

In the next step, a for loop is defined that checks the list value in range , and define an if block, that checks multiple value and add value into the list2, and in the next step, the for loop is defined that prints the list2 values.    

6 0
3 years ago
1111111111111111111111111111
NISA [10]

Answer:

in order to use correct codes, ensure the variables in loops are in brackets

3 0
3 years ago
Other questions:
  • Write a class called Counter that represents a simple tally counter, which might be used to count people as they enter a room. T
    9·1 answer
  • Place the following discoverers in the correct chronological order of the timeframe for their discoveries, from earliest to most
    5·1 answer
  • Host A is a PC, connected to switch SW1 and assigned to VLAN 1. Which of the following are typically assigned an IP address in t
    13·1 answer
  • According to Android’s suggested user interface standards, repeatedly pressing the app icon on an app’s action bar will eventual
    5·2 answers
  • Which of these identifies the intersection of row 16 and column D?
    14·1 answer
  • If you were writing a story set in our time, what would you include to give readers a sense of our world? Check any that apply.
    5·1 answer
  • When Google created its China-based search engine www..cn, they did not foresee eventually abandoning it because of censorship i
    12·1 answer
  • Danny wants to create a web page for her friends dog walking service. Which coding language should she use
    12·1 answer
  • While using a web-based order form, an attacker enters an unusually large value in the Quantity field. The value he or she enter
    15·1 answer
  • Define a toString prototype method that returns the cat's name, gender, and age separated by semicolons.
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!