Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Computer Engineering Expert

I -

1. Write a program which takes 2 digits, X,Y as input and generates a 2-dimensional array. The element value in the i-th row and j-th column of the array should be i * j.

2. Define a function which can generate and print a list where the values are square of numbers between 1 and 20.

Write proper doc string for the function

3. Write a program that calculates and prints the value according to the given formula:

Q=√(2∗C∗D)/H

Following are the fixed values of C and H:

C is 50. H is 30.

D is the variable whose values should be input to your program in a comma-separated sequence.

4. Write a program to compute the frequency of the words from the input. The output should print after sorting the key alphanumerically.

II-

PART ONE: Linear Algebra in Python

1) create the vector v=(3,7) and plot it.

# importing future for compatibility between python 2 and python 3

from __future__ import print_function

# importing needed packages

import numpy as np

import pylab as pl

# The dollowing command (it is called a magic command)

# is needed to display plots in the notebook.

%pylab inline

Populating the interactive namespace from numpy and matplotlib

2) modify vector v so as to get a vector twice as long, in the same direction of v=(3,7). Call the new vector vLong and plot it. For this and all following plots also plot the orivinal vector v with a dashed, grey line.

3) create a function, that takes as argument an angle (in degrees) and returns a roatation matrix (also a numpyndarray). Name the function rotMatrix.

defrotMatrix(angle):

4) apply the rotation matrix to the vector v=(3,7) and rotate it by 30 degrees counterclockwise, call this vector v30, and then by 90 degrees clockwise call this vector v90. plot them.

5) Sum the vectors vLong and v90. Plot the original vectors with dashed grey lines and the resulting vector.

PART TWO: Bayes theorem

1. Two connected devices A and B have the following probabilities of failure: P(A)=6% and P(B)=5%, while once second device fails the first one does so with the conditional probability of $P(A|B)=60\%$. a) What is the probability of two devices failing together? b) What is the probability of the second device to fail once the first one did?

2. Given three stocks of devices A,B,C, such that A has 5% of defective items in it, B has 10% and C has 3%, we pick up a random device from a random stock and it turns out to be defective. What is the probability that it came from the stock C?

Attachment:- Assignment.rar

Computer Engineering, Engineering

  • Category:- Computer Engineering
  • Reference No.:- M91944808

Have any Question?


Related Questions in Computer Engineering

What is the lithium by mass in a sample of pure lithium

What is the % lithium by mass in a sample of pure lithium carbonate that has a sample size of 10.0g?

Question using the apple company identify all the social

Question: Using the Apple company, identify all the social media platforms it currently uses. List all the social media platforms. List five different KPI's you could use to measure the engagement on each platform. Expla ...

Where do cfos get their money newswhere do cfos get their

Where do CFOs get their money news? Where do CFOs get their money news? According to Robert Half International, 47% get their money news from newspapers, 15% get it from communication/colleagues, 12% get it from televisi ...

Question suppose you have to design a mobile application to

Question : Suppose you have to design a mobile application to control your microwave over internet. Define the objective, assumptions and Interface Metaphors of this application.

Question suppose you were looking at network traffic and

Question : Suppose you were looking at network traffic and saw one computer transmit: Who has 192.168.1.1 And saw the reply 192.168.1.1 is at 00:cc:11:8b:73:22. What process would you be looking at? Why is this process n ...

Need references for information for the following dealing

Need references for information for the following dealing with CSMS (Consolidated Sales and Marketing System Project) Produce a narrative which describes the added error-handling pathways that includes: an overview of th ...

What are some skills individuals who work in the field of

What are some skills individuals who work in the field of cyber security need to prevent hacks in to a company's computers?

Write a program to ask the user to eithernbspselect 1 to

Write a program to ask the user to either  Select 1 to print the digits in an integer reversely  Select 2 to print the characters in a string reversely using a switch case, your program will either 1- call the recursive ...

A street vendor is asking people to play a simple game you

A street vendor is asking people to play a simple game. You roll a pair of dice. If the sum on the dice is 10 or higher, you win $10. If you roll a pair of 1's, you win $59. Otherwise you lose $5. If the random variable ...

1 a consumer has 300 to spend on goods x and y the market

1. A consumer has $300 to spend on goods X and Y. The market prices of these two goods are Px $15 and Py $5. a. What is the market rate of substitution between goods X and Y? b. Show how the consumer's opportunity set ch ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As