Questions
Trace (show the steps) the outer loops and draw the final array. In your documentation, use...

Trace (show the steps) the outer loops and draw the final array. In your documentation, use a chart with columns titled: outer loop, inner loop, counter, a, b. Assume the array is six (6) rows, seven (7) columns and filled with zeros (0s) when started.

counter = 1; for(int a = 1; a < 6; a++) { for(int b = 5; b >= 0; b--) { if(b %a == 0) { arr[a][b] = counter; counter++; } else { arr[b][a] = counter; counter--; } } }

In: Computer Science

Python 3 Fix the code. It is not saving the data into the xls file Code:...

Python 3

Fix the code. It is not saving the data into the xls file

Code:

import tkinter as tk
from tkcalendar import DateEntry
from openpyxl import load_workbook
from tkinter import messagebox
from datetime import datetime


window = tk.Tk()
window.title("daily logs")
window.grid_columnconfigure(1,weight=1)
window.grid_rowconfigure(1,weight=1)

# labels
tk.Label(window, text="Bar code").grid(row=0, sticky="W", pady=20, padx=20)
tk.Label(window, text="Products failed").grid(row=1, sticky="W", pady=20, padx=20)
tk.Label(window, text="Money Lost").grid(row=2, sticky="W", pady=20, padx=20)
tk.Label(window, text="sold by").grid(row=3, sticky="W", pady=20, padx=20)
tk.Label(window, text="Working product").grid(row=4, sticky="W", pady=20, padx=20) #Working product label
tk.Label(window, text="Failed date").grid(row=5, sticky="W", pady=20, padx=20)


# entries
barcode = tk.Entry(window)
product = tk.Entry(window)
money = tk.Entry(window)

# arraging
barcode.grid(row=0, column=1)
product.grid(row=1, column=1)
money.grid(row=2, column=1)

options = tk.StringVar(window)
options.set("Choose one value")     # default value
soldData = tk.OptionMenu(window, options, "Peter", "John", "Mary", "Jonatan", "Steve")
soldData.grid(row=3, column=1)

cal = DateEntry(window, width=12, background='darkblue', foreground='white', borderwidth=2)
cal.grid(row=5, column=1)

#option menu for working product Yes/No
optionsWorkingProduct = tk.StringVar(window)
optionsWorkingProduct.set("Choose working product")     # default value
workingProduct = tk.OptionMenu(window, optionsWorkingProduct, "Yes", "No")
workingProduct.grid(row=4, column=1)
barcode_ls=[]

def readValue():
    excel_barcode = barcode.get()
    excel_product = product.get()
    excel_money = money.get()
    excel_sold = options.get()
    excel_workingProduct= optionsWorkingProduct.get()

    if excel_sold.strip() == 'Choose one value':
        messagebox.showwarning("Error", "Please select a value for sold by")
        return
    if excel_workingProduct.strip() == 'Choose working product': #check for the not selected working product
        messagebox.showwarning("Error", "Please select a value for working product")
        return

    date = datetime.now()
    print(date)

    if(barcode_ls.count(excel_barcode)>=3):
        messagebox.showwarning("Error", "The product is already tested 3 times and it reached the limits")
        return

    barcode_ls.append(excel_barcode)


    data = [excel_barcode, excel_product, excel_money, excel_sold, date, excel_workingProduct]
    workbook = load_workbook("dailylog.xlsx")
    worksheet = workbook.worksheets[0]
    worksheet.append(data)
    workbook.save("dailylog.xlsx")
    cleardate()


def cleardate():
    barcode.delete(0, 'end')
    product.delete(0, 'end')
    money.delete(0, 'end')
    options.set("Choose one value")     # default value
    optionsWorkingProduct.set("Choose working product") # default value set to the working product
    today = datetime.now()
    cal.set_date(today)
    cleardate()


# button to trigger actions
button = tk.Button(text="SUBMIT", command=readValue).grid(row=6, pady=20, padx=20)
button = tk.Button(text="CLEAR", command=cleardate).grid(row=6, column=1, pady=20, padx=20)
window.geometry("500x500")
window.mainloop()

In: Computer Science

Document the arrays, using a chart with columns titled: outer loop, inner loop, i, j, and...

Document the arrays, using a chart with columns titled: outer loop, inner loop, i, j, and x. Finally, draw a picture of each array (after the program portion has executed). (5 pts) int[][] arr1 = new int[5][5]; int[][] arr2 = new int[5][5]; x = 1; for(int i = 0; I < 5; i++) { for(int j = 1; j < 6; j++) { arr1[i][j-1] = x; x++; if(x == 6) x += 2; } } for(int i = 4; i >= 0; i--) for(int j = 4; j > -1; j--) arr2[j][i] = arr1[i][j];

In: Computer Science

Solve the initial value problem: y'' + 4y' + 4y = 0; y(0) = 1, y'(0)...

Solve the initial value problem: y'' + 4y' + 4y = 0; y(0) = 1, y'(0) = 0.

Solve without the Laplace Transform, first, and then with the Laplace Transform.

In: Advanced Math

base the following questions on the study of consumer reciprocity. -How do consumers enter into and...

base the following questions on the study of consumer reciprocity.

-How do consumers enter into and respond to specific situations where reciprocity may be expected.
-How consumers are affected by the relationships between the parties of the reciprocal exchange.
- The impact on reciprocity of the value and significance of an exchange.

In: Operations Management

We are developing an online to give to job applications to measure their suitability for a...

We are developing an online to give to job applications to measure their suitability for a sales position and one of the key attributes for a good salesperson is emotional intelligence. We plan to use Trait Emotional Intelligence Questionnaire (TEIQue) to measure emotional intelligence. Explain how and why you would use convergent validity to validity the TEIQue before using it?

In: Operations Management

Calculate the work (in kJ) when 2.60 moles of methane react with excess oxygen at 363...

Calculate the work (in kJ) when 2.60 moles of methane react with excess oxygen at 363 K:

CH4(g) + 2O2(g) ? CO2(g) + 2H2O(l)

In: Chemistry

Write a complete C++ program that defines, implements, and utilizes a Lion class and a Pine...

Write a complete C++ program that defines, implements, and utilizes a Lion class and a Pine class. Definition of classes from the implementation of the classes should be split. The program is made of five files: Lion.h, Lion.cpp, Pine.h, Pine.cpp, and TestLionPine.cpp. The components of Lion class are defined in the Lion.h file; however, all constructors and methods should not have any implementation code in this header file. All implementation code, i.e. constructor body and method body, should be written in Lion.cpp, which refers to the Lion.h using an include directive. The Lion class consists of the following components:

  • Properties (MUST be private):   
    • weight: double
    • height: double
  • Constructors:
    • No-argument constructor: the constructor with no parameter
    • Standard constructor: with the same number of parameters as properties.
  • Methods
    • For each private property, create one get() method and one set() method to provide reading and writing access to this property. Here, there should be two get() methods and two set() methods.
    • toPrint(): no return. It prints out the names and current values of all properties.  
    • eat(): no return, print with a complete sentence how this type of lions eat. For example, eat every 48 hours, eat meat only, or eat much more in rainy season.

The components of Pine class are defined in the Pine.h file; however, all constructors and methods should not have any implementation code in this header file. All implementation code, i.e. constructor body and method body, should be written in Pine.cpp, which refers to the Pine.h using an include directive. The Pine class consists of following components.

  • Properties (MUST be private):
    • age: int
    • height: double
  • Constructors:
    • No-argument constructor: the constructor with no parameter
    • Standard constructor: with the same number of parameters as properties.
  • Methods
    • For each private property, create one get() method and one set() method to provide reading and writing access to this property. Here, there should be two get() methods and two set() methods.
    • toPrint(): no return. It prints out the names and current values of all properties.
    • produceCone(): no return, print with a complete sentence how this type of pine tree grows its pinecone. For example, produce annually, or produce on new branches.

The TestLionPine.cpp files contains only the main function for testing the Lion class and Pine class. In the main() function, create two Lion objects and two Pine objects respectively. For each class, create one from the no-argument constructor, another from the standard constructor. Before calling the standard constructor, two values should be read from the user with proper prompts. At the end, call every method from each object. Preferably, follow the sequence below:

  1. Call the get() methods to display original property value.
  2. Call the set() methods to change property values. For each property, or for each set() method, a new property value should be read from the user with proper prompt.
  3. Call the toPrint() method to print the updated property values with proper prompt text.
  4. Call other regular methods.

In: Computer Science

Leadership and Management theories and Management issues. define and explain the following concepts of conflicts management?...

Leadership and Management theories and Management issues.

define and explain the following concepts of conflicts management?

  • Compromising
  • Collaborating
  • Competing
  • Avoiding
  • Accomodating

In: Nursing

100 50 / 2006 2003 - 2.5 1.25 / 4 ^ * * 2 4 2...

100 50 / 2006 2003 - 2.5 1.25 / 4 ^ * * 2 4 2 ^ # ^ /

Postfix expression please explain

In: Computer Science

Please make a sales forecast for an all in one washer and dryer that costs $1020...

Please make a sales forecast for an all in one washer and dryer that costs $1020 I have no idea how to do this. Im supposed to create my own numbers because I "made" the product. You can make the numbers up just label it please. It says to put it in a table

In: Finance

The Attaran Corporation manufactures two electrical​ products: portable air conditioners and portable heaters. The assembly process...

The Attaran Corporation manufactures two electrical​ products: portable air conditioners and portable heaters. The assembly process for each is similar in that both require a certain amount of wiring and drilling. Each air conditioner takes 3 hours of wiring and 2 hours of drilling. Each heater must go through 2 hours of wiring and 1 hour of drilling. During the next production​ period, 240 hours of wiring time are available and up to 130 hours of drilling time may be used. Each air conditioner sold yields a profit of ​$20. Each heater assembled may be sold for a ​$16 profit.

Number of air conditioners to be produced​ =_____ ​(round your response to two decimal​ places).
Number of heaters to be produced​ = _______​(round your response to two decimal​ places).
Optimal solution value​ = _______​(round your response to two decimal​ places).

In: Operations Management

The Coca-Cola Company A summary of the selected strategy and the impact on R&D, Finance and...

The Coca-Cola Company

  1. A summary of the selected strategy and the impact on R&D, Finance and Accounting, and MIS.
  2. A description of the role that the R&D, Finance and Accounting, and MIS would play in the implementation of the strategy.
  3. An analysis of the changes to these organizations that would be required for successful implementation.
  4. Recommendations for feasible changes.

In: Operations Management

The Coca-Cola Company A description of a strategy in the selected organization to evaluate. Analysis of...

The Coca-Cola Company

  1. A description of a strategy in the selected organization to evaluate.
  2. Analysis of the various evaluation methods(goals based, process based and outcomes based. Goal based evaluations measure if objectives have been achieved. Process based evaluations analyze strengths and weaknesses)  and their applicability to the strategy identified in #1 above.
  3. Proposed method for evaluating the strategy. Design the table, graph, or questionnaire that you recommend, and provide detailed clarification for categories or measurements. Include tables or diagrams to show your recommendations.
  4. Proposed contingency plans to accompany the evaluation.

In: Operations Management

For each case history provide: a diagnosis; list the criteria required for the diagnosis; and provide...

For each case history provide:

  1. a diagnosis;
  2. list the criteria required for the diagnosis; and
  3. provide examples from the case history for each of the criteria listed.
    For example, if one of the criteria for a diagnosis is "delusions", then you should list "delusions, e.g., believes he is receiving special/hidden messages from television programs that he only understands".

Emilio (DSM-IV Casebook, p. 189-190)


Emilio is a 40-year-old man who looks 10 years younger. He is brought to the hospital, his twelfth hospitalisation, by his mother because she is afraid of him. He is dressed in a ragged overcoat, bedroom slippers, and a baseball cap, and wears several medals around his neck. His affect ranges from anger at his mother ("She feeds me sh*t . . . what comes out of other people's rectums") to a giggling, obsequious seductiveness toward the interviewer. His speech and manner have a childlike quality, and he walks with a mincing step and exaggerated hip movements. His mother reports that he stopped taking his medication about a month ago, and has since begun to hear voices and to look and act more bizarrely. When asked what he has been doing, he says "Eating wires and lighting fires." His spontaneous speech is often incoherent and marked by frequent rhyming and clang associations (speech in which sounds, rather than meaningful relationships, govern word choice).


Emilio's first hospitalisation occurred after he dropped out of school at age 16, and since that time he has never been able to attend school or hold a job. He has been treated with medication during his hospitalizations, but doesn't continue to take medication when he leaves, so he quickly becomes disorganised again. He lives with his elderly mother, but sometimes disappears for several months at a time, and is eventually picked up by the police as he wanders in the streets. There is no known history of drug or alcohol abuse.

In: Psychology