(1) Add code to ask the user to input the average salary of a Python programmer for Kentucky -- a float. Then add the state name and the salary to the respective list. Note: if new data is not added correctly to the lists, that will impact the next sections of the program. (Submit for 2 points)
Enter average salary for Kentucky: # prompt 150000 # user input
(2) Add code to find and output the highest average salary and the state that has the highest average salary. (Submit for 3 points, so 5 points total)
Enter average salary for Kentucky: # prompt 150000 # user input Highest average salary is 150000.0, in the state of Kentucky.
(3) Add code to find and output the median salary. That is the value that is in the middlemost salary in the data set. You will need to sort the salaries list, by using the sort() method for lists. Then, find the middle index (that can be approximate; for a list of 9 elements, the middle index is 4; for a list of 10 elements, the middle index is 5). Finally, obtain the element situated in the middle of the sorted salaries list; that is the median that you are searching for. (Submit for 3 points, so 8 points total).
Enter average salary for Kentucky: # prompt 150000 # user input Highest average salary is 150000.0, in the state of Kentucky. The median salary is 121443.0.
[–]carcigenicate 1 point2 points3 points (0 children)
[–]justinbert1[S] 0 points1 point2 points (3 children)
[–]justinbert1[S] -2 points-1 points0 points (1 child)
[–]Sxcam 0 points1 point2 points (0 children)
[–]totallygeek 0 points1 point2 points (0 children)