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
Helga [31]
2 years ago
15

Your program is going to compare the distinct salaries of two individuals for the last 5 years. If the salary for the two indivi

dual for a particular year is exactly the same, you should print an error and make the user enter both the salaries again for that year. (The condition is that there salaries should not be the exact same).Your program should accept from the user the salaries for each individual one year at a time. When the user is finished entering the salaries, the program should print which individual made the highest total salary over the 5 year period. This is the individual whose salary is the highest.You have to use arrays and loops in this assignment.In the sample output examples, what the user entered is shownin italics.Welcome to the winning card program.
Enter the salary individual 1 got in year 1>10000
Enter the salary individual 2 got in year 1 >50000
Enter the salary individual 1 got in year 2 >30000
Enter the salary individual 2 got in year 2 >50000
Enter the salary individual 1 got in year 3>35000
Enter the salary individual 2 got in year 3 >105000
Enter the salary individual 1 got in year 4>85000
Enter the salary individual 2 got in year 4 >68000
Enter the salary individual 1 got in year 5>75000
Enter the salary individual 2 got in year 5 >100000
Individual 2 has the highest salary
Computers and Technology
1 answer:
kirza4 [7]2 years ago
4 0

In python:

i = 1

lst1 = ([])

lst2 = ([])

while i <= 5:

   person1 = int(input("Enter the salary individual 1 got in year {}".format(i)))

   person2 = int(input("Enter the salary individual 1 got in year {}".format(i)))

   lst1.append(person1)

   lst2.append(person2)

   i += 1

if sum(lst1) > sum(lst2):

   print("Individual 1 has the highest salary")

else:

   print("Individual 2 has the highest salary")

This works correctly if the two individuals do not end up with the same salary overall.

You might be interested in
An inventory clerk, using a computer terminal, views the following on screen: part number, part description, quantity on hand, q
Sveta_85 [38]

Answer:

The answer is letter D. RECORD

Explanation:

An inventory clerk, using a computer terminal, views the following on screen: part number, part description, quantity on hand, quantity on order, order quantity, and reorder point for a particular inventory item. Collectively, these data make up a____Record______

3 0
3 years ago
You’ve received a tarball called data79.tar from a colleague, but you want to check the names of the files it contains before ex
Nina [5.8K]

Answer:

D. tar rvf data79.tar

4 0
2 years ago
Compare the current in two lightbulbs wired in a series circuit
julia-pushkina [17]
<span>The current flow in two light bulbs wired in a series circuit is identica</span>
7 0
3 years ago
Which of the following is true of the poka-yoke approach used for mistake-proofing processes?
Svetradugi [14.3K]

Answer:  b)It helps to engage workers in continuous improvement activities.

Explanation: Poke-yoke method was the technique to eliminate the mistakes that happen in a manufacturing process. It helps in avoiding the issues in the product and correcting those errors.

Mistake proofing is the mechanism of this methods that ensures about the product manufactured is safe from any failure and defects.It alerts the workers to improve the product through their working.

Other options are incorrect because it was developed by Shigeo Shingo , they had easy mechanism and feedback system did not told the workers about defects.Thus, the correct option is option(b).

7 0
2 years ago
Read 2 more answers
Do the police check your mobile device during police checks?
Marat540 [252]
it depends............

4 0
2 years ago
Read 2 more answers
Other questions:
  • Which of these is an aggregator?
    9·2 answers
  • SQL a. has become the de facto standard database language b. can be used to define database systems c. both a. and b. d. none of
    10·1 answer
  • The desktops of computers running the same OS all look the same
    8·1 answer
  • 1. The best program to present numerical data in would be ____. a. Access c. PowerPoint b. Excel d. Word
    6·1 answer
  • Create a pseudocode program that asks students to enter a word. Call a function to compute the different ways in which the lette
    9·1 answer
  • to add data to to a chart, you must format data from another microsoft office product, that automatically opens. whats the name
    10·1 answer
  • What will be the values of ans, x, and y after the following statements are executed? int ans = 35, x = 50, y =50; if ( x &gt;=
    7·2 answers
  • The command-line interface tells a user that it's ready to receive commands by displaying a specific set of characters called a(
    12·1 answer
  • Which are examples of types of audio media that can support a presentation? Check all that apply.
    14·2 answers
  • Guys, if I'm going back to 505 and it's a 7-hour flight or a 45-minute drive how do I get to 505?
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!