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
A _____ is the viewing area for a web page, which is much smaller on a phone than on a traditional desktop.
-BARSIC- [3]
A viewport is the viewing area for a web page, which is much smaller on a phone than on a traditional desktop .
6 0
3 years ago
Fill in the blanks of the SQL Statements: Fund_Id VARCHAR(10) , Donor_id VARCHAR(10) , Count_Of_Receipts INTEGER, Total_Receipts
PSYCHO15rus [73]

Answer:

I am attaching a doc file for the answer.

Explanation:

The attached file has the answer with explanation.

Download docx
3 0
3 years ago
Hello 10 points if my Chromebook is on 26 percent how much time do I have left theoretically
velikii [3]
About 15 minutes.......
7 0
3 years ago
Read 2 more answers
Guys I need help I cant download anything in the app store I restarted my phone and I know it's not the space on my phone I have
Simora [160]

Can you give me further explanation? For example, how is your phone not letting you download things? What model of a phone is it? what update is it on? and to what extent can you download something?

4 0
2 years ago
Are sql injections legal?
natima [27]

Essentially, if you are seen to be someone who knows what you are doing, then even typing in a single-quote to a web form has been enough to be arrested and charged over in the past.

But lets say i'm writing a pen test tool that will be doing sqli testing and let it loose on sites that are 'out in the wild'. I'm not going to be doing dumps of any information. But is just the vulnerability scan itself illegal?



8 0
3 years ago
Other questions:
  • The main purpose of a constructor is to initialize the data members at the moment that an object is created. true or false?
    8·1 answer
  • Company policies require that all network infrastructure devices send system level information to a centralized server. Which of
    6·1 answer
  • Jerry has received an email on his company’s email system. The email is in regard to a new update the company plans to implement
    9·1 answer
  • 1.Terry turned on his computer one day to find that all of the storage on his computer was filled up. Furthermore, there were ma
    6·1 answer
  • Match the installation type to its description.
    9·1 answer
  • Calculate the cash available to retire debt for each of the six months. There is cash available to retire debt if there is a cas
    8·1 answer
  • Which command is used to copy entire folder structures between volumes or across a network while maintaining all NTFS file permi
    10·1 answer
  • )
    11·1 answer
  • Explain how mobile phone production could be more sustainable​
    8·2 answers
  • 1. Who was the first lady programmer?​
    14·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!