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]
3 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]3 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
Do you think people are willing to buy these products? Why?
SSSSS [86.1K]
What products ma’am/sir
3 0
3 years ago
Read 2 more answers
Info, and Contact Us. She will create a hierarchy of page elements and revise the style sheets. In this case, the Home page cont
Alchen [17]

Answer:

link

Explanation:

3 0
3 years ago
How good are vw beetle heaters in winter?
Vinvika [58]
It depends on the heater but in most case it works pretty well
7 0
3 years ago
What is by far the most popular dns server software available?.
JulijaS [17]

Answer:

I use the server

8.8.8.8

and

8.8.4.4

Explanation:

6 0
3 years ago
Tl;dr - i need a good application to bypass school firewall
just olya [345]

Answer:

dang. thats tough. i just used nord VPN

Explanation:

6 0
4 years ago
Read 2 more answers
Other questions:
  • 11. In Microsoft Word, when you highlight existing text you want to replace, you're in
    8·1 answer
  • What is the Explicit Dependencies Principle? Explain why explicit dependencies are better than implicit dependencies.
    6·1 answer
  • Egovernment involves the use of strategies and technologies to transform government by improving the delivery of services and en
    7·1 answer
  • Which of the following would be a show stopper for the development of an enterprise mobile app? The app demands data throughput
    11·1 answer
  • Describe the following types of Cloud services:
    11·1 answer
  • Help me with this please​
    7·2 answers
  • Which of the following technique is well suited to support very large address space, e.g. 64-bit address space? Select one: a. C
    11·1 answer
  • Write a query that returns the first name of a student whose last name is "Patil" and is in the Ravenclaw house.
    9·1 answer
  • A local router is configured to limit the bandwidth of guest users connecting to the Internet. Which of the following best expla
    15·1 answer
  • When it comes to game mechanics, what is the most universal mechanic that is present in virtually every computer game that you c
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!