Question: Need some help writing this program in python you will be creating a program that will allow a user to enter a tech job title,
Need some help writing this program in python
you will be creating a program that will allow a user to enter a tech job title, generate a random salary for that job, and then determine either the minimum, maximum, or average of the different salaries for those job titles.
Your program should provide the user with a menu to choose if they want to find the minimum, maximum, or average. Then it will continuously prompt the user to enter a job title and generate a random salary between 10000 and 199999 (inclusive), until the user enters quit. Based upon the users selection the program should then output either the minimum, maximum, or average with the appropriate labels.
Be sure to use nested while loops for this program with priming reads. Look over the while loop notes and the example program that contains a priming read.
Your Task
The program should do the following:
- Continuously prompt and accept for input a menu choice (1 for minimum, 2 for maximum, and 3 for average), until the user enters 0
- Continuously prompt and accept for input a job title and generate a random salary between 10000 and 199999 (inclusive) until the user enters quit.
- Based upon the menu choice determine the minimum, maximum, or average salary
- Display the appropriate information
- End the program run when the user enters 0.
- Display a thank you message once the user enters 0.
You do not need to verify the user input for this project. We will assume that all input is entered correctly, such as job titles.
Two sample runs of the program are shown below. Prompts and labels should be the same as shown in the sample runs (User input is shown in bold)
Sample Run #1
Determine the minimum, maximum, or average of the minimum salary of different tech jobs. What would you like to calculate? Enter 1 for min, 2 for max, 3 for average, or 0 to quit: 3
Enter the job title name or quit to exit: UX Manager The salary is: 102489
Enter the job title name or quit to exit: Enterprise Architect The salary is: 122585
Enter the job title name or quit to exit: Data Architect The salary is: 104840
Enter the job title name or quit to exit: Data Scientist The salary is: 97027
Enter the job title name or quit to exit: quit
The average wage of the jobs entered is: 106735.25
Determine the minimum, maximum, or average of the minimum wage of different tech jobs. What would you like to calculate? Enter 1 for min, 2 for max, 3 for average, or 0 to quit: 2
Enter the job title name or quit to exit: Solutions Architect The salary is: 106436
Enter the job title name or quit to exit: Cloud Engineer The salary is: 98626
Enter the job title name or quit to exit: quit The maximum wage of the jobs entered is: Job Title: Solutions Architect Salary: 106436.0
Determine the minimum, maximum, or average of the minimum wage of different tech jobs. What would you like to calculate? Enter 1 for min, 2 for max, 3 for average, or 0 to quit: 0 Thank you!
Sample Run #2
Determine the minimum, maximum, or average of the minimum salary of different tech jobs. What would you like to calculate? Enter 1 for min, 2 for max, 3 for average, or 0 to quit: 1
Enter the job title name or quit to exit: Software Dev Manager The salary is: 109809
Enter the job title name or quit to exit: Analytics Manager The salary is: 95238
Enter the job title name or quit to exit: Applications Dev Manager The salary is: 107735
Enter the job title name or quit to exit: quit
The minimum wage of the jobs entered is: Job Title: Analytics Manager Salary: 95238.0
Determine the minimum, maximum, or average of the minimum wage of different tech jobs. What would you like to calculate? Enter 1 for min, 2 for max, 3 for average, or 0 to quit: 3
Enter the job title name or quit to exit: Information Security Engineer The salary is: 95786
Enter the job title name or quit to exit: Site Reliability Engineer The salary is: 100855
Enter the job title name or quit to exit: quit
The average wage of the jobs entered is: 98320.5
Determine the minimum, maximum, or average of the minimum wage of different tech jobs. What would you like to calculate? Enter 1 for min, 2 for max, 3 for average, or 0 to quit: 0 Thank you!
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
