Let x, y and z be three vectors in a vector space V
a. Give a definition of span{x,y, z} in set notation.
An assessment is generally associated with indication of
1. Authenticity
2. Achievement
3. Alignments
4. Accountability
The weights of students in a certain school are normally distributed with a mean weight of 66 kg. 10% have a weight greater than 70kg. What percentage of students weighs between 52kg and 66kg?
Write a program that does the following:
1. Initialize the variables.
2. Prompt the user to enter 20 numbers.
3. For each number in the list:
a. Get the next number.
b. Output the number (echo input).
c. If the number is even: {i. Increment the even count. ii. If the number is zero, increment the zero count. }otherwise, Increment the odd count.
4. Print the results.
1. You can initialize the variables zeros, evens, and odds when you declare them.
2. Use an output statement to prompt the user to enter 20 numbers.
3. For Step 3, you can use a for loop to process and analyze the 20 numbers.
In pseudocode, this step is written as follows: for (counter = 1; counter <= 20; counter++) { a. get the number; b. output the number; c. switch (number % 2) //check the remainder { case 0: increment the even count; if (number == 0) increment the zero count; break; case 1: case -1: increment the odd count; }//end switch }//end for 4. Print the result. Output the values of the variables zeros, evens, and odds.
Write a program that does the following:
8. a. if (nthFibonacci == 1)
the desired Fibonacci number is the first Fibonacci number.
Copy the value of previous1 into current.
b. else if (nthFibonacci == 2)
the desired Fibonacci number is the second Fibonacci number.
Copy the value of previous2 into current.
c. else calculate the desired Fibonacci number as follows:
Since you already know the first two Fibonacci numbers of the
sequence, start by determining the third Fibonacci number.
i. Initialize counter to 3, to keep track of the calculated
Fibonacci numbers.
ii. Calculate the next Fibonacci number, as follows:
current = previous2 + previous1;
iii. Assign the value of previous2 to previous1.
iv. Assign the value of current to previous2.
v. Increment counter.
9. Append the nth Fibonacci number to outputString. Notice that
the nth Fibonacci number is stored in current.
10. Display the output dialog box showing the first two and the nth Fibonacci
numbers.
A crane thatlifts a60kg mss 100m in60s calculate power
The Gaussian distribution also known as the Normal distribution, is given by the following
equation:
𝑦(𝑥) = 𝑒𝑥𝑝 −(𝑥−𝜇)^2/2𝜎2
where parameter 𝝁 is the mean and 𝝈 the standard deviation.
(i) Write a MATLAB code to create a 1000 point Gaussian distribution of random numbers
having 𝜇 = 0 and 𝜎 = 1. (20)
(ii) Plot this distribution. (10)
(iii) Prove that the full width–half maximum (FWHM), of the above distribution is given by :
FWHM = 2𝜎√2ln 2 (10)
(iv) Write a program that estimates the FWHM from your data/graph. (10)
An alternative implementation of singly linked list is to create a structure of two external
pointers for the list, which contains both head and tail pointers.(( )* )
1
i ThoughtNumber MaximumNumber ThoughtNumber ThoughtNumber
n
i
100 *100
struct list {
nodeptr head;
nodeptr tail;
};
These pointers points to the first and the last elements of the list. Thus, the cost of
inserting a new element at end and deleting from the end of the list will be optimized to
O(1). Therefore, considering the given specification, write a C++ program which
implements the necessary operations for both unsorted and sorted list.
I. For unsorted list
Insertion of new element at head and at end
Deletion of an element from head, end and any element which mentioned with
key
Search
II. For sorted list
Insertion of new element at its proper position
Deletion of an element from head, end and any element which mentioned with
key
Search
// Lab: Binary Search (find errors)
// Written by:
#include <iostream>
#include <cstdlib>
using namespace std;
int binarySearch(const int array[], int numElems, int value);
int main() {
int list[100] = {5, 5, 8, 8, 8, 8, 9, 8, 9, 9, 10};
int length = 11;
for (int i = 0; i < length; i++) {
cout << list[i] << " ";
}
cout << endl;
for (int i = 0; i < 2 * length; i++) { // SEARCH 2 * length times
int target = rand() % 5 + 5; // generate a random target within the range 5 to 10
int location = binarySearch(list, length, target);
if (location = - 1)
cout << target << " NOT found!" << endl;
else
{
// print a range: from index A to Z, inclusive!
int z = location + 1;
while( z < length && list[z] == list[location] )
z++;
z--;