USE THE FOLLOWING LIVE SCRIPT: Exam_2_275_template.mlx  Ther…

USE THE FOLLOWING LIVE SCRIPT: Exam_2_275_template.mlx  There are two problems that you must complete. 1. Determine the gain and resonant frequency for the forced oscillator mx’’ + bx’ + kx = bsin(wt). Then plot the gain as a function of w. The required steps for submission of this problem are given in (a)-(d) below. This problem is similar to Computer Lab 4, #4 and Homework 4.7 that used MATLAB. (a) Your first 3 lines of code, which define, m,k,b, must be rng(‘shuffle’) C=randi(,1,2) m=C(1), k=C(2), b=min(C) (b) Find the resonant frequency.  This may be done by hand or with MATLAB but a typed answer must be submitted. (c) Find the complex gain, g(i*w), and the absolute value of this gain, g(w)=|g(i*w)|. (d) Plot the gain, g(w), as a function of w. You must submit your input and output as well as the graph generated. The single file upload should also include #2 below.   2. Solve the ODE system x’ =Ax using MATLAB where A= and a is defined below.  The required steps for submission of this problem are given in (a)-(c) below. (a) Your first 3 lines of code must be clear all rng(‘shuffle’) a=randi() (b) Find the eigenvalues and eigenvectors for the coefficient matrix A.  They are complex. (c) Write your answer using the formula given in (5.76) in the book, which is the same as tbe last few lines of Computer Lab 5 #3. You must submit your input and output as well as the graph generated. UPLOAD the script in PDF format ONLY.  MLX submissions will either have a deduction or NOT be graded. UPLOAD the script in PDF format ONLY.  UPLOAD the script in PDF format ONLY. 

You are given the following function: def custom_sum(start,…

You are given the following function: def custom_sum(start, *args, **kwargs): “”” Computes a custom sum and returns a breakdown of the calculation. Args: start (int): A starting value for the sum. *args: Additional numbers to include in the sum. **kwargs: Keyword arguments that modify the behavior of the function. Keyword Arguments: multiplier (int): A value to multiply the sum by (default is 1). Returns: dict: A dictionary containing: – total: The sum of start and *args. – multiplier: The multiplier applied to the total. – result: The final calculated result. “”” total = start + sum(args) multiplier = kwargs.get(“multiplier”, 1) result = total * multiplier return { “total”: total, “multiplier”: multiplier, “result”: result } For the following inputs, provide the expected function output: custom_sum(2, 3, 1, multiplier=2) custom_sum(1, 1, 1) custom_sum(0, 2, 3, multiplier=3, addend=1) custom_sum(0, -1, -2, multiplier=1, log=True, verbose=False) custom_sum(5, multiplier=2, addend=3)

Problem: Create a tkinter GUI application that toggles betw…

Problem: Create a tkinter GUI application that toggles between “ON” and “OFF” using a custom frame. Follow these specifications: Instructions: Custom Frame: Create a custom class ToggleFrame that inherits from tk.Frame. This frame should contain: A Label to display the current state (“ON” or “OFF”), initially set to “OFF”. A Button with the text “Toggle”. When clicked, it toggles the label’s text between “ON” and “OFF”. Any tkinter layout manager (pack, grid, or place) may be used. Integration: The ToggleFrame class should be instantiated in the main application and displayed within the main window, including running the main loop.

Bonus Question 1: Briefly discuss:  a) What did you learn ab…

Bonus Question 1: Briefly discuss:  a) What did you learn about cost accounting from the plant tour?  include what type of business, what type of cost accounting was used. Be specific.  b) how did the tour guide’s presentation inform and integrate the with the managerial topics we have covered to date.   Be sure to answer all parts of the question to get full credit!