Questions
#Write a program in Python that given a list of positive integers, return another list where...

#Write a program in Python that given a list of positive integers, return another list where each element corresponds to the sum of the digits of the elements o#f the given list.
#Example:
# input
# alist=[124, 5, 914, 21, 3421]
# output
# sum=[7, 5, 14, 3, 18]

In: Computer Science

One-year Treasury bills currently earn 4.00 percent. You expect that one year from now, 1-year Treasury...

One-year Treasury bills currently earn 4.00 percent. You expect that one year from now, 1-year Treasury bill rates will increase to 4.20 percent. The liquidity premium on 2-year securities is 0.06 percent. If the liquidity theory is correct, what should the current rate be on 2-year Treasury securities? (Do not round intermediate calculations. Round your answer to 2 decimal places.)

In: Finance

Data Modelling is the primary step in the process of database design. Compare and contrast Conceptual...

Data Modelling is the primary step in the process of database design. Compare and contrast Conceptual data model versus Physical data model. Illustrates with help of example to list down data (entities), relationship among data and constraints on data.

In: Computer Science

I am exploiting a buffer overflow attack and need to find three pieces of information in...

I am exploiting a buffer overflow attack and need to find three pieces of information in Linux using gdb.

  • 1) The address of the function system
  • 2) The address of the function parameter for system() which is /bin/sh. /bin/ parameter is what will spawn a shell
  • 3) The address of a function that can exit the shell.

I was able to use gbd commands to find the first two but what command would I use to find the address of a function that can exit the shell?

In: Computer Science

The Normal Probability distribution has many practical uses. Please provide some examples of real life data...

The Normal Probability distribution has many practical uses. Please provide some examples of real life data sets that are normally distributed.

In: Math

Post the total amounts from the journal in the following general ledger accounts and in the...

Post the total amounts from the journal in the following general ledger accounts and in the accounts receivable subsidiary ledger accounts for Paula Kohr, Page Alistair, and Nic Nelson.

[The following information applies to the questions displayed below.]

Wiset Company completes these transactions during April of the current year (the terms of all its credit sales are 2/10, n/30).

Apr. 2 Purchased $15,600 of merchandise on credit from Noth Company, invoice dated April 2, terms 2/10, n/60.
3 (a) Sold merchandise on credit to Page Alistair, Invoice No. 760, for $4,300 (cost is $3,100).
3 (b) Purchased $1,590 of office supplies on credit from Custer, Inc. Invoice dated April 2, terms n/10 EOM.
4 Issued Check No. 587 to World View for advertising expense, $868.
5 Sold merchandise on credit to Paula Kohr, Invoice No. 761, for $9,900 (cost is $6,900).
6 Received an $80 credit memorandum from Custer, Inc., for the return of some of the office supplies received on April 3.
9 Purchased $11,850 of store equipment on credit from Hal’s Supply, invoice dated April 9, terms n/10 EOM.
11 Sold merchandise on credit to Nic Nelson, Invoice No. 762, for $11,700 (cost is $6,500).
12 Issued Check No. 588 to Noth Company in payment of its April 2 invoice less the discount.
13 (a) Received payment from Page Alistair for the April 3 sale less the discount.
13 (b) Sold $12,400 of merchandise on credit to Page Alistair (cost is $3,400), Invoice No. 763.
14 Received payment from Paula Kohr for the April 5 sale less the discount.
16 (a) Issued Check No. 589, payable to Payroll, in payment of sales salaries expense for the first half of the month, $10,400. Cashed the check and paid employees.
16 (b) Cash sales for the first half of the month are $52,660 (cost is $36,700). (Cash sales are recorded daily from cash register data but are recorded only twice in this problem to reduce repetitive entries.)
17 Purchased $11,400 of merchandise on credit from Grant Company, invoice dated April 17, terms 2/10, n/30.
18 Borrowed $60,000 cash from First State Bank by signing a long-term note payable.
20 (a) Received payment from Nic Nelson for the April 11 sale less the discount.
20 (b) Purchased $820 of store supplies on credit from Hal’s Supply, invoice dated April 19, terms n/10 EOM.
23 (a) Received a $700 credit memorandum from Grant Company for the return of defective merchandise received on April 17.
23 (b) Received payment from Page Alistair for the April 13 sale less the discount.
25 Purchased $11,185 of merchandise on credit from Noth Company, invoice dated April 24, terms 2/10, n/60.
26 Issued Check No. 590 to Grant Company in payment of its April 17 invoice less the return and the discount.
27 (a) Sold $3,180 of merchandise on credit to Paula Kohr, Invoice No. 764 (cost is $2,700).
27 (b) Sold $8,400 of merchandise on credit to Nic Nelson, Invoice No. 765 (cost is $5,110).
30 (a) Issued Check No. 591, payable to Payroll, in payment of the sales salaries expense for the last half of the month, $10,400.
30 (b) Cash sales for the last half of the month are $71,000 (cost is $58,000).


In: Accounting

Calculate the pH of a 0.50 M solution of sodium benzoate (NaC6H5COO) given that the Ka...

Calculate the pH of a 0.50 M solution of sodium benzoate (NaC6H5COO) given that the Ka of benzoic acid (C6H5COOH) is 6.50 x 10-5.

In: Chemistry

using Matlab only please. function sail_boat x = linspace(0,100,2*pi); for x plot(x, sin(x),'b','LineWidth',3) axis([0,2*pi+.1,-1.05,1.05]) hold on...

using Matlab only please. 

function sail_boat
x = linspace(0,100,2*pi);
for x
    plot(x, sin(x),'b','LineWidth',3)
    axis([0,2*pi+.1,-1.05,1.05])
    hold on
    boat(x,sin(x))
    pause(.05)
end
 
function boat(x,y)
xc = [x-.1,x+.1,x+.2,x-.2,x-.1];
yc = [y,y,y+.1,y+.1,y];
plot(xc,yc,'k')

The function is supposed to plot a sine curve and an animation of a representation of a boat moving on top of the curve, but the code has several errors. Notice that the program uses modulization and it calls another function inside sail_boat. Correct the code and submit it with a new name sail_boat_correct.m Note that the code uses the function linspace(). We have seen it before but if you are not familiar with it, make sure to look it up. The pause() function is used in the animation, causing the plotting to pause for 0.05 seconds, aiding in the visualization. Also, submit a Word document providing a quick description of what edits you had to make and how you went about finding the errors. Name the Word document Debugging.docx.

In: Computer Science

based on the film Trapped, Do you think abortion restrictions might vary according to region? For...

based on the film Trapped, Do you think abortion restrictions might vary according to region? For instance, the documentary largely explores abortion restrictions in rural areas in the South and Midwest. How might abortion restrictions look in other parts of the United States (cities and/or suburbs)? Consider restrictions in accessing abortions that may not be reflected in law.

In: Psychology

Route Canal Shipping Company has the following schedule for aging of accounts receivable: Age of Receivables...

Route Canal Shipping Company has the following schedule for aging of accounts receivable:

Age of Receivables
April 30, 20X1

(1) (2) (3) (4)
Month of
Sales
Age of
Account
Amounts Percent of
Amount Due
April 0–30 $ 189,000 _______
March 31–60 135,000 _______
February 61–90 162,000 _______
January 91–120 54,000 _______
Total receivables $ 540,000 100%

a. Calculate the percentage of amount due for each month.

b. If the firm had $1,620,000 in credit sales over the four-month period, compute the average collection period. Average daily credit sales should be based on a 120-day period.

c. If the firm likes to see its bills collected in 45 days, should it be satisfied with the average collection period?


d. Disregarding your answer to part c and considering the aging schedule for accounts receivable, should the company be satisfied?

In: Finance

Distinguish between recourse and non recourse debt within a partnership.

Distinguish between recourse and non recourse debt within a partnership.

In: Accounting

Discuss guaranteed payments within the confines of partnership operations.

Discuss guaranteed payments within the confines of partnership operations.

In: Accounting

Which of the following team is responsible for mapping solutions with process flow? pick one Production...

Which of the following team is responsible for mapping solutions with process flow? pick one

Production Support and Monitoring Team

Business Excellence Team

Scripting Team

Scripting and Operations Team

In: Computer Science

import math import numpy as np import numpy.linalg from scipy.linalg import solve A = np.array([[-math.cos(math.pi/6),0, math.cos(math.pi/3),0,...

import math
import numpy as np
import numpy.linalg
from scipy.linalg import solve



A = np.array([[-math.cos(math.pi/6),0, math.cos(math.pi/3),0, 0, 0],
             [-math.sin(math.pi/6), 0, -math.sin(math.pi/3), 0, 0, 0],
             [math.cos(math.pi/6), 1, 0, 1, 0, 0],
             [math.sin(math.pi/6), 0, 0, 0, 1, 0],
             [0, -1, -math.cos(math.pi/3), 0, 0, 0],
             [0, 0, math.sin(math.pi/3), 0, 0, 1]])

b = np.array([0, 2000, 0, 0, 0, 0])
x = [0, 0, 0, 0, 0, 0]



def seidel(a, x, b):
    # Finding length of a(3)
    n = len(a)
    # for loop for 3 times as to calculate x, y , z
    for j in range(0, n):
        # temp variable d to store b[j]
        d = b[j]

        # to calculate respective xi, yi, zi
        for i in range(0, n):
            if (j != i):
                d -= a[j][i] * x[i]
        # updating the value of our solution
        x[j] = d / a[j][j]
    # returning our updated solution
    return x


seidel(A, x, b)

RESULTS:

:\Users\mauri\Anaconda3\python.exe "C:/Users/mauri/PycharmProjects/OCEN 261 APPLIED NUMERICAL METHODS/HW 7.py"
C:/Users/mauri/PycharmProjects/OCEN 261 APPLIED NUMERICAL METHODS/HW 7.py:75: RuntimeWarning: divide by zero encountered in double_scalars
x[j] = d / a[j][j]
C:/Users/mauri/PycharmProjects/OCEN 261 APPLIED NUMERICAL METHODS/HW 7.py:73: RuntimeWarning:

PLEASE HELP MEND MY GAUSS-Seidel Code

In: Computer Science

Web Server Infrastructure Web application infrastructure includes sub-components and external applications that provide efficiency, scalability, reliability,...

Web Server Infrastructure

Web application infrastructure includes sub-components and external applications that provide efficiency, scalability, reliability, robustness, and most critically, security.

  • The same advancements made in web applications that provide users these conveniences are the same components that criminal hackers use to exploit them. Prudent security administrators need to be aware of how to harden such systems.

Use the graphic below to answer the following questions:

Stage 1

Stage 2

Stage 3

Stage 4

Stage 5

Client

Firewall

Web Server

Web Application

Database

  1. What stage is the most inner part of the web architecture where data such as, customer names, addresses, account numbers, and credit card info, is stored?

  1. Which stage includes online forms, word processors, shopping carts, video and photo editing, spreadsheets, file scanning, file conversion, and email programs such as G mail, Yahoo and AOL.

  1. What stage is the component that stores files (e.g. HTML documents, images, CSS stylesheets, and JavaScript files) that's connected to the Internet and provides support for physical data interactions between other devices connected to the web?

  1. What stage is where the end user interacts with the World Wide Web through the use of a web browser?
  2. Which stage is designed to prevent unauthorized access to and from protected web server resources?

In: Computer Science