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
Inga [223]
3 years ago
5

Prompt the user to input five pairs of numbers: A player's jersey number (0 - 99) and the player's rating (1 - 9). Store the jer

sey numbers in one int array and the ratings in another int array. Output these arrays (i.e., output the roster). (3 pts)
Ex:

Enter player 1's jersey number: 84
Enter player 1's rating: 7

Enter player 2's jersey number: 23
Enter player 2's rating: 4

Enter player 3's jersey number: 4
Enter player 3's rating: 5

Enter player 4's jersey number: 30
Enter player 4's rating: 2

Enter player 5's jersey number: 66
Enter player 5's rating: 9


ROSTER
Player 1 -- Jersey number: 84, Rating: 7
Player 2 -- Jersey number: 23, Rating: 4
...
Computers and Technology
1 answer:
tiny-mole [99]3 years ago
3 0

Answer:

  1. import java.util.Scanner;
  2. public class Main {
  3.    public static void main (String [] args) {
  4.        int jersey_num [] = new int[5];
  5.        int rating [] = new int[5];
  6.        Scanner inStream = new Scanner(System.in);
  7.        for(int i=0; i < 5; i++){
  8.            System.out.print("Enter player " + (i+1) + "'s jersey number:");
  9.            jersey_num[i] = inStream.nextInt();
  10.            System.out.print("Enter player " + (i+1) + "'s rating:");
  11.            rating[i] = inStream.nextInt();
  12.        }
  13.        System.out.println("ROSTER");
  14.        for(int j=0; j < 5; j++){
  15.            System.out.println("Player " + (j+1) + "-- Jersey number: " + jersey_num[j] + ", Rating: " + rating[j]);
  16.        }
  17.    }
  18. }

Explanation:

The solution code is written in Java. Firstly create two array, jersey_num and rating, with int type. This is to hold the five pairs of numbers input by user (Line 6 -7).

Next, create a for loop that run for 5 iterations and in each iteration prompt user to input jersey number and rating (Line 11 -17). The input number and rating will be set to the array, jersey_num and rating, respectively.

Next, print the title "Roster" (Line 19).

Create another for loop to display the five input pair of values (Line 21 - 23).

You might be interested in
HELP FAST
Ghella [55]

Answer:

spelling errors and/or punctuation errors

4 0
3 years ago
Which program will have the output shown below?
kumpel [21]

for count in range(5, 8):

   print(count)

This will produce.

5

6

7

I hope this helps!

5 0
3 years ago
10. Two technicians are discussing recycling specifications for refrigerant. Technician A says that refrigerant oil with 5,000 p
NARA [144]

Answer:

a

Explanation:

8 0
3 years ago
Write a pyhton program to calculate area of a circle?
marta [7]

Answer:

The code to calculate the area of a circle is:

from math import pi

def circleArea(radius):

 if radius > 0:

   return pi * (radius ** 2)

 else:

   return None

if __name__ == '__main__':

 radius = 5

 print("Radius: {} Area: {}".format(radius,circleArea(radius)))

Explanation:

A detailed explanation of each line of code is given below.

#Define the number pi used to calculate the area

from math import pi

#We define a function that calculates the area of a circle

def circleArea(radius):

#Check if the radius is valid ( radius > 0) since there aren´t negative radius

 if radius > 0:

#Compute the area formula for a circle \pi * radius^{2}

   return pi * (radius ** 2)

 else:

#Return None if the radius is invalid

   return None

#Run the function we´ve defined

if __name__ == '__main__':

#Define a radius

 radius = 5

#Call the function and parse the radius through it, then print the result

 print("Radius: {} Area: {}".format(radius,circleArea(radius)))

8 0
3 years ago
The human resource department at Mega Corporation is overwhelmed with a constant flood of résumés submitted through its website
ad-work [718]

Answer: The answer to the question, How might an applicant-tracking system help the department; is pretty simple. What this question really asks for is to explain the innovation of the Applicant Tracking System (commonly abbreviated as ATS). So the foremost thing to do is to describe the Applicant tracking system. Application tracking tracking systems (ATS from hereon), are digital systems that are designed to make the recruitment process for employers way less tedious than it normally should be. Imagine you had to hire for a huge company like Microsoft that could receive tens of thousands of applications everyday for a specific role. It would be pretty tedious to determine the most qualified for the role if you had to go through all the applications yourself. Even if you had a team of people, it would still be stressful and error prone because, as humans we can make mistakes and slip in the wrong file for an interview or even misplace an application or mix something up somewhere. Now imagine if you didn't have to do all that because a computer program can do it with more precision and speed than you and your whole team are capable of. That would be splendid, right? Well, you don't have to. Aanya in the question above does not have to bother the department with the tedious work. The ATS will take care of a good chunk of the work. Here's how it works. The ATS is comprised of bots that are programmed to scan through applications and arrange them in order of qualification and matching of requirements. A bot is software application that's preset to run programs automatically, usually over the internet. So when people apply on Mega Corporation's platform, the applications are sent through to the scanning of the ATS. Now the requirements for the job role will be filled in by the department ATS so it knows what it's looking out for. For example, if one of the requirements for the job is a Master's degree in Psychology, applications without Master's degrees will be grouped separately from those that have. Same thing for other criteria like years of experience, Age, etcetera. The ATS receives all these applications and groups them such that, at the deadline of the application process, the ATS would have screened a good portion of the applicants and only the most qualified would be left for the next stage of screening. This is how the Applicant Tracking System would help the Human Resource department at Mega Corporation.

7 0
3 years ago
Other questions:
  • Trading your bicycle for a snowboard exemplifies ?
    15·1 answer
  • My home PC has IP address 192.168.1.22 and connects to the Internet through a NAT router. Assume I am downloading a web page fro
    5·1 answer
  • ___ Jacking is a crime that takes place when a hacker misdirects URL to a different site. The Link Itself Looks Safe, But the us
    11·1 answer
  • What connector has 4 pins, is used for older IDE drives and some SATA drives, and can provide +5 V and +12 V power outputs?
    11·1 answer
  • Can anyone find any words in here?
    14·2 answers
  • What is the best operating system
    12·1 answer
  • What was the original motivation for developing the internet?
    7·1 answer
  • In a car crash, wearing a seat belt __________________.
    5·2 answers
  • What happen if there is no authentication??
    10·2 answers
  • You text file begins with the following rows. The pattern is a description of the item to be repaired, its color, and the issue.
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!