THis is Python
Write an overseerSystem function that has a kwargs argument.
Within the function, see if the keyword temperature exists in
kwargs. If it does, and the temperature is greater than 500, print
a warning with the temperature.
Also see if the keyword CO2level exists in kwargs. If it does, and
the CO2level is greater than .15, print a warning with the
CO2level.
Lastly, see if the keyword miscError exists in kwargs. If it does,
print a warning with the miscError number.
Test from main by creating five messages and calling the overseerSystem function with each message.
Message1 is temperature:550
Message2 is temperature:475
Message3 is temperature:450, miscError:404
Message4 is CO2level:.18
Message5 is CO2level:.2, miscError:418
Sample Execution Results:
Warning: temperature is 550 Misc error #404 Warning: CO2level is 0.18 Warning: CO2level is 0.2 Misc error #418
Thank you
CODE:
# overseerSystem function definition
def overseerSystem(**kwargs):
for i in kwargs: # loop for iterate through every
keyword in kwargs
# Checks whether the keyword
temperature exists in kwargs
if(i=="temparature"):
# # Checks
whether the CO2level is greater than 500
if(kwargs[i]>500):
print("Warning: temperature is",kwargs[i]) #
Prints Warning
# Checks whether the keyword
CO2level exists in kwargs
if(i=="CO2level"):
# Chechs whether
the CO2level is greater than .15
if(kwargs[i]>.15):
print("Warning: CO2level is",kwargs[i]) # Prints
Warning
# Checks whether the keyword
miscError exists in kwargs
if(i=="miscError"):
print("Misc
error #"+str(kwargs[i])) # Prints miscError
# calling the overseerSystem function with each message.
overseerSystem(temparature = 550)
overseerSystem(temparature = 475)
overseerSystem(temparature = 450,miscError = 404)
overseerSystem(CO2level = .18)
overseerSystem(CO2level = .2,miscError = 418)
CODE ATTACHMENTS:

OUTPUT:

SUMMARY:
We can use **kwargs to let your functions take an arbitrary number of keyword arguments ("kwargs" means "keyword arguments")
First we check the given keywords does exist or not in kwargs.
If it does, we check for the conditions given for that corresponding keyword.
And Print Output in required format.
PLEASE 'LIKE' MY SOLUTION AND COMMENT IF YOU HAVE ANY DOUBTS.
THis is Python Write an overseerSystem function that has a kwargs argument. Within the function, see...
Use python!!! need to match the execution result that is provided. Part One – Keyword Arguments and Default Values Write an invoice function. The function will generate a simple invoice and will have two required arguments and two keyword arguments. The two required arguments are unitPrice and quantity. The first keyword argument is shipping, and it has a default value of 10. The second keyword argument is handling, and it has a default value of 5. Test it twice from...
Use python!!! need to match the execution result that is provided. Part One – Keyword Arguments and Default Values Write an invoice function. The function will generate a simple invoice and will have two required arguments and two keyword arguments. The two required arguments are unitPrice and quantity. The first keyword argument is shipping, and it has a default value of 10. The second keyword argument is handling, and it has a default value of 5. Test it twice from...
C
Language
Write the code that dynamically allocates an array of struct objects based on a size entered through the command line arguments, You will use the following struct and enum. typedef enum Color { RED, GREEN, BLUE } Color; typedef struct MyStruct { int value; Color color; } MyStruct; Write the code to do the following: a. Check for one additional command line argument. Only proceed to the rest of the program if it exists and that the value...
Write a program that determines if a string (passed as a command-line argument) has all unique characters. The program must print the number of times each existing character appears, and then print whether or not they are all unique. Special requirements: You are NOT allowed to modify the input string or create any additional data structures (no arrays, lists, dictionaries, or other strings). You may have only one string (the one received as the command-line argument). You may have one...
[MATLAB] Write a function called myMultProd.m that computes the cumulative product of the elements in a vector. The cumulative product, pj, of the jth element of the vector x, xj, is defined by pj = (x1)(x2) … (xj) for j = 1:length of the vector x. DO NOT USE CUMPROD For example, when you run your function it should look like this: >> x = [2 3 4 2]; >> myMultProd(x) >> ans = 2 6 24 48 That is,...
PYTHON LANGUAGE HW Due Sunday, November 17th at 11:59 PM. Deliverables There is one deliverable for this assignment hw10.py Make sure the script obeys all the rules in the Script Requirements page. Setup All work for this assignment must be done on users3.cs.umb.edu. The hw10.py file must be created in an hw10 directory, inside your hw directory, inside your it117 directory. From your home directory go to your it117 directory cd it117 Go to your hwdirectory cd hw Create an...
python 2..fundamentals of python 1.Package Newton’s method for approximating square roots (Case Study 3.6) in a function named newton. This function expects the input number as an argument and returns the estimate of its square root. The script should also include a main function that allows the user to compute square roots of inputs until she presses the enter/return key. 2.Convert Newton’s method for approximating square roots in Project 1 to a recursive function named newton. (Hint: The estimate of...
For this c++ assignment, Overview write a program that will process two sets of numeric information. The information will be needed for later processing, so it will be stored in two arrays that will be displayed, sorted, and displayed (again). One set of numeric information will be read from a file while the other will be randomly generated. The arrays that will be used in the assignment should be declared to hold a maximum of 50 double or float elements....
python
11.8 Multiple committees The eventual goal of this assignment is to compute the total number of ways of forming a collection of committees from an academic department of n professors. The first task is to write a function called committee to compute the number of ways of forming a single committee with members from a collection of n people. This is the same as compușing the number of ways of choosing r people out of n to sit at...
PYTHON PROGRAMMING LANGUAGE (NEEDED ASAP)
Using a structured approach to writing the program: This section will guide you in starting the program in a methodical way. The program will display a window with GUI widgets that are associated with particular functions: Employee Payroll O X -- - - - - - - - - - - Show Payroll Find Employee by Name Highest Lowest Find Employee by Amount Write Output to Fie Cancel - -------- ------------- Notice that some of...