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
Anna007 [38]
2 years ago
5

Write a function called PayLevel that returns a level given an Ssn as input. The level are: "Above Average" if the employee mak

es more than the average for their department "Average" if the employee makes the average for their department "Below Average" if the employee makes less than the average for their department
Computers and Technology
1 answer:
kotykmax [81]2 years ago
7 0

Answer:

Explanation:

Since no further information was provided I created the PayLevel function as requested. It takes the Ssn as input and checks it with a premade dictionary of Ssn numbers with their according salaries. Then it checks that salary against the average of all the salaries and prints out whether it is Above, Below, or Average. The output can be seen in the attached picture below.

employeeDict = {162564298: 40000, 131485785: 120000, 161524444: 65000, 333221845: 48000}

average = 68250

def PayLevel(Ssn):

   pay = employeeDict[Ssn]

   print("Employee " + str(Ssn) + " is:", end=" "),

   if pay > average:

       print("Above Average")

   elif pay < average:

       print("Below Average")

   else:

       print("Average")

PayLevel(161524444)

PayLevel(131485785)

You might be interested in
Problems with using a single Local Area Network (LAN) to interconnect devices on a premise include ______.
Aleks [24]

Answer:

A. insufficient reliability, limited capacity, and inappropriate network interconnection devices

Explanation:

LANs are unsecured and unreliable because they provide a way of another users to have access to others computers. They are also difficult to manage and access because the data they use is always shared between many different sources and this reduces the internet speed and limits the network capacity.

7 0
3 years ago
Write a program named as calcPrice.c that formats product information entered by the user and calculate the total amount of purc
Colt1911 [192]

Answer:

Here is the calcPrice.c program:

#include <stdio.h>   //to use input output functions

int main(void)  {  //start of main method

   int itemNo, month, day, year, quantity;  //declares variables to hold item number, quantity, and date

   float unitPrice; //declare variable to hold price per unit

   printf("Enter item number: ");  // prompts user to enter item number

   scanf("%d", &itemNo);  //reads item number from user and stores it in itemNo variable

   printf("Enter unit price: ");  // prompts user to enter unit price

   scanf("%f", &unitPrice);  //reads input unit price and stores it in unitPrice variable

   

    printf("Enter quantity: ");  //prompts user to enter quantity

   scanf("%d", &quantity);  //reads input quantity and stores it in quantity variable

   printf("Enter purchase date (mm/dd/yyyy): ");  //prompts user to enter purchase date

   scanf("%d/%d/%d", &month, &day, &year);  //reads input date and stores it in month, day and year variables

    float totalAmount = unitPrice * quantity;  //computes the total amount

   printf("\nItem\tUnit Price\tQTY\tPurchase Date\tTotal Amount\n");  //displays the item, unit price, qty, purchase data and total amount with tab space between each

   printf("%d\t$%5.2f\t%d\t%.2d/%.2d/%d\t$%5.2f\n", itemNo, unitPrice,quantity, month, day, year,totalAmount);   }    //displays the values of itemNo, unitPrice, quantity, month, day, year and computed totalAmount with tab space between each

Explanation:

Lets suppose user enters 583 as item number, 13.5 as unit price, 2 as quantity and 09/15/2016 as date so

itemNo = 583

unitPrice = 13.5

quantity = 2

month = 09

day = 15

year = 2016

totalAmount is computed as:

  totalAmount = unitPrice * quantity;

 totalAmount = 13.5* 2

totalAmount = 27.00

Hence the output of the entire program is:

Item    Unit Price      QTY     Purchase Date   Total Amount      

583     $  13.50           2           09/15/2016         $  27.00  

The screenshot of the program along with its output is attached.

4 0
3 years ago
What is the difference between HTML and XML?
Luba_88 [7]

Explanation:

HTML displays data and describe the structure of a webpage while XML stores and transfers data.

7 0
2 years ago
Want to.learn about computers​
MAVERICK [17]
Yes...I do want to learn about computer
6 0
3 years ago
How long does it take to wire a house?
Licemer1 [7]

Answer:

the rewiring of an entire home may take up to a week. Smaller jobs, like wiring a single room, may take one to two days

Explanation:

4 0
3 years ago
Read 2 more answers
Other questions:
  • What is the most consistent item regardless of the software used in BI?
    5·1 answer
  • What is this I’m so lost
    9·1 answer
  • Mary is entering her senior year of college. She has a meeting on Friday with her advisor to discuss her career plans.Mary is al
    15·1 answer
  • Hosts A and B are communicating over a TCP connection, and Host B has already received from A all bytes up through byte 126. Sup
    10·1 answer
  • When you catch an Exception object, you can call ____ to display a list of methods in the call stack so you can determine the lo
    6·1 answer
  • Pls help have absolutely no clue how to delete this
    12·2 answers
  • Using a text editor, create a file that contains a list of at least 15 six-digit account numbers. Read in each account number an
    7·1 answer
  • Which of the following technologies does NOT facilitate the transferring of data between computers in adjacent buildings?
    12·1 answer
  • What is a method that deletes an item from a list using the item’s value?
    11·1 answer
  • Sự ra đời của thương mại điện tử có tác động như thế nào đến việc quảng cáo và Marketing sản phẩm
    11·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!