This is not a question It's free 5 points!
Answer:
Output of the following program is :56
Explanation:
In the given code snippet, x is initialize with 5 and y is with 0.Then y=x++ statement will assign 5 to y and the increment the value of x,because x++ is a post increment operator.So the value of x will increase after this statement.First print statement will print the value of y i.e 5 and the next print statement will print the value of x i.e 6 without space.Therefore the Output will be 56.
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)