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
kotegsom [21]
3 years ago
14

9.2 code practice edhesive

Computers and Technology
1 answer:
Pavlova-9 [17]3 years ago
6 0

Answer:

import java.util.Scanner;

public class Main

{

public static void main(String[] args) {

    String NAME[]= new String[5];

    Scanner s1= new Scanner(System.in);

 System.out.println("Enter Array Elements(Names)");

 for( int i=0; i <= 4; i++)

 {

     NAME[i]= s1.nextLine();

 }

 System.out.println("Array Elements(Names)");

 for( int i=0; i <= 4; i++)

 {

    System.out.println(NAME[i]);

 }

 

}

}

Explanation:

We need to write a program in java to explain the array declaration. And we have that program in the answer section.

You might be interested in
A school at which you are likely to be accepted because you meet graduation requirements is called a:
zloy xaker [14]
The answer for Apex College and Career Prep 2 would be Probable College. 
7 0
3 years ago
What is programming blocks?
charle [14.2K]

Answer:

In computer programming, a block or code block is a lexical structure of source code which is grouped togethe

Explanation:

3 0
3 years ago
Ms Access is spreadsheet software.True or false​
Doss [256]

Answer: I'd say false.

Explanation: An example of a spreadsheet software would be MS Excel. Access does have an option to create a spreadsheet but it also has other uses.

6 0
3 years ago
Read 2 more answers
The game begins with the player having 20 POINTS
kompoz [17]

Answer:

Following are the code to this question:

import random#import package for using random method  

def rolling_dice(): #defining method rolling_dice that uses a random number to calculate and add value in dice1 and dice2 variable

   dice1 = random.randint(1,6)

   dice2 = random.randint(1,6)

   return dice1 + dice2

def rolling(): # defining method rolling

   n_roll = 0  # defining num variable that initial value that is 0.

   p = 20 # defining variable p for looping, that points in between 1 and 59

   while p > 0 and p < 60: # defining loop that counts value dice value two times  

       d = rolling_dice()#defining d variable that hold method value

       n_roll+= 1 #defining n_roll that increment n_roll value by 1

       if d == 7 or d == 11:# defining if block that uses the d variable that checks either 7 or 11, player won d in p variable

           p+= d   # use p variable that adds d variable

       elif d == 2 or d == 3 or d == 12:#defining elif block to that checks d variable by using or operator  

           p-= d#defining d variable that decreases d variable variable

       else: # defining else block

           p1 = d # using p1 variable that store d value  

           while True:# defining loop that calculates values

               d = rolling_dice()#defining d variable that holds method values

               n_roll += 1 #increment the n_roll value by 1

               if d == 7:#defining if block that checks d value equal to 7

                   p -= p1#subtract the value of p1 in p variable  

                   break # exit loop

               elif d == p:#defining elif block to check d value is equal to p

                   p += p1#adds the value of p1 in p variable  

                   break#using break keyword

   if p<= 0:#defining if block that checks p-value is less then equal to 0  

       print('Player lost')#using print method

   elif p>= 60:#defining else block that checks p-value is greater than equal to 60

       print('Player won')#using print method to print the value

   print('number of dice rolls:', n_roll)#use print method to print n_rolls value

rolling()

Output:

Player lost

number of dice rolls: 38

Explanation:

In the above-given python code, a method "rolling_dice" is declared, inside the method two-variable "dice1 and dice2" is declared, that uses the random method to calculate the value in both variable and use the return keyword to add both values.

  • In the next step, another method the "rolling"  is declared, inside the method "n_roll and p" is declared that assigns the values and use the two while loop, inside the loop if block is defined that calculates the values.
  • In the next step, a condition block is used that stores value in the p variable and use the print method to print the "n_roll" value.  
8 0
3 years ago
Companies use computers for which of the following?
RoseWind [281]

Answer:

Buisness,creation,advertising.

7 0
3 years ago
Other questions:
  • A user is trying to delete a file located on an NTFS volume on his Windows 8 computer but is unable to do so. Why is this?
    6·1 answer
  • The smallest unit of storage in the following list is a
    7·1 answer
  • Write the equivalent c++ expression for the following algebraic expressions
    11·1 answer
  • The class attribute
    8·1 answer
  • In mathematics, the square root of a negative number is not real; in Java therefore, passing such a value to the square root fun
    12·1 answer
  • Explain why decomposition will be used in creating the algorithm for the game including two dice.
    11·1 answer
  • List an example of application software used in spreadsheet​
    11·2 answers
  • HELP TIMED!!!!!!!!!!!!!!!!!!!!
    5·2 answers
  • What are different between system and application software?​
    14·1 answer
  • Which tab allows you to review the slideshow timings?<br> O Home<br> O View<br> O Review<br> O File
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!