Answer:
The pseudocoded algorithm is as follows:
Procedure sumOdd(lotsOfNumbers):
oddSum = 0
len = length(lotsOfNumbers)
for i = 0 to len - 1
if lotsOfNumbers[i] Mod 2 != 0:
OddSum = OddSum + lotsOfNumbers[i]
Print(OddSum)
Explanation:
This defines the procedure
Procedure sumOdd(lotsOfNumbers):
This initializes the oddSum to 0
oddSum = 0
This calculates the length of the list
len = length(lotsOfNumbers)
This iterates through the list
for i = 0 to len-1
This checks if current list item is odd
if lotsOfNumbers[i] Mod 2 != 0:
If yes, the number is added to OddSum
OddSum = OddSum + lotsOfNumbers[i]
This prints the calculated sum
Print(OddSum)
helpppp me please..
........
Answer:
The employer's monthly salary (X)
Help asap dont answer with a link
Answer:
90
Explanation:
dur nearly all my friends and family knows that
Which of the following parameters is optional sample(a,b,c,d=7
The optional Parameter is D as it is said to be assigned an integer value of 7.
What are optional parameters?This is known to be a process that is made up of optional choices that one do not need to push or force so as to pass arguments at their set time.
Note that The optional Parameter is D as it is said to be assigned an integer value of: 7 because it implies that one can use the call method without pushing the arguments.
Learn more about Parameter from
https://brainly.com/question/13151723
#SPJ2
A disk has 4000 cylinders, each with 8 tracks of 512 blocks. A seek takes 1 msec per cylinder moved. If no attempt is made to put the blocks of a file close to each other, two blocks that are logically consecutive (i.e. follow one another in the file) will require an average seek, which takes 5 msec. If, however, the operating system makes an attempt to cluster related blocks, the mean interblock distance can be reduced to 2 cylinders and the seek time reduced to 100 microsec. How long does it take to read a 100 block file in both cases, if the rotational latency is 10 msec and the transfer time is 20 microsec per block
Answer:
The answer is below
Explanation:
a)
If the blocks of a file are not put together, that is for nonadjacent block of files to each other, the time (t) taken to read a 100 block file is:
t = (average seek + rotational latency + transfer time) * 100 block
Average seek = 5 msec, rotational latency = 10 msec and transfer time = 20 microsec = 0.02 msec
t = (5 + 10 + 0.02) * 100 = 1502 msec
b)
If the blocks of a file are put together, that is for adjacent block of files to each other, the time (t) taken to read a 100 block file is:
t = (seek time * mean interblock distance + rotational latency + transfer time) * 100 block
seek time = 100 microsec = 0.1 msec, rotational latency = 10 msec and transfer time = 20 microsec = 0.02 msec, mean interblock distance = 2 cylinders
t = (0.1*2 + 10 + 0.02) * 100 = 1022 msec
what does command do
Write a program that will input temperatures for consecutive days. The program will store these values into an array and call a function that will return the average of the temperatures. It will also call a function that will return the highest temperature and a function that will return the lowest temperature. The user will input the number of temperatures to be read. There will be no more than 50 temperatures. Use typedef to declare the array type. The average should be displayed to two decimal places
Answer:
#include <iostream>
using namespace std;
typedef double* temperatures;
double avg(array t, int length);
double min(array t, int length);
double max(array t, int length);
int main()
{
cout << "Please input the number of temperatures to be read." << endl;
int num;
cin >> num;
temperatures = new double[num];
for(int i = 0; i < num; i++)
{
cout << "Input temperature " << (i+1) << ":" << endl;
cin >> temperatures[i];
}
cout << "The average temperature is " << avg(temperatures, num) << endl;
cout << "The highest temperature is " << max(temperatures, num) << endl;
cout << "The lowest temperature is " << min(temperatures, num) << endl;
}
double avg(array t, int length)
{
double sum = 0.0;
for(int i = 0; i < length; i++)
sum += t[i];
return sum/length;
}
double min(array t, int length)
{
if(length == 0)
return 0;
double min = t[0];
for(int i = 1; i < length; i++)
if(t[i] < min)
min = t[i];
return min;
}
double max(array t, int length)
{
if(length == 0)
return 0;
double max = t[0];
for(int i = 1; i < length; i++)
if(t[i] > min)
max = t[i];
return max;
}
Explanation:
The C++ program get the array of temperatures not more than 50 items and displays the mean, minimum and maximum values of the temperature array.
Consider the following static method, calculate.
public static int calculate(int x)
{
x = x + x;
x = x + x;
x = x + x;
return x;
}
Which of the following can be used to replace the body of calculate so that the modified version of calculate will return the same result as the original version for all values of x?
return 8 * x;
return 3 + x;
return 3 * x;
return 6 * x;
return 4 * x;
Answer:
return 8 * x;
Explanation:
Required
What can replace the three lines of x = x + x
We have, on the first line:
[tex]x=>x +x[/tex]
[tex]x=>2x[/tex]
On the second line:
[tex]x=>x +x[/tex]
[tex]x=>2x[/tex]
Recall that, the result of line 1 is: [tex]x=>2x[/tex]
So, we have:
[tex]x=>2 * 2x[/tex]
[tex]x=>4x[/tex] --- at the end of [tex]line\ 2[/tex]
On the third line:
[tex]x=>x +x[/tex]
[tex]x=>2x[/tex]
Recall that, the result of line 2 is: [tex]x=>4x[/tex]
So, we have:
[tex]x = 2 * 4x[/tex]
[tex]x => 8x[/tex]
So: 8 * x can be used
A (n) ___ system can help a business alleviate the need for multiple information systems.
Answer:
Enterprise Resource Planning
Explanation:
ERP
You received an email message stating that your mother's bank account is going to be forfeited if you do not respond to the email. Is it safe to reply?Why?
It's a scenario<3
Answer:
No.
Explanation:
I'm almost certain it's a scam. Banks generally don't use emails to contact clients. They use telephones and paper correspondence. If they contact you by email it is because they have no other way of getting in touch with you because you have changed your address and your phone, etc..
2. Write a Python regular expression to replace all white space with # in given string “Python is very simple programming language.”
Dear Parent, Please note that for your convenience, the School Fee counter would remain open on Saturday,27th March 2021 from 8am to 2 pm. Kindly clear the outstanding amount on account of fee of your ward immediately either by paying online through parent portal or by depositing the cheque at the fee counter to avoid late fee charges.For payment of fee the following link can also be used Pay.balbharati.org
Do you think that dealing with big data demands high ethical regulations, accountability, and responsibility of the person as well as the company? Why
Answer:
i will help you waiting
Explanation:
Yes dealing with big data demands high ethical regulations, accountability and responsibility.
The answer is Yes because while dealing with big data, ethical regulations, accountability and responsibility must be strictly followed. Some of the principles that have to be followed are:
Confidentiality: The information contained in the data must be treated as highly confidential. Information must not be let out to a third party.Responsibility: The people responsible for handling the data must be good in analyzing big data. They should also have the required skills that are needed.Accountability: The service that is being provided has to be very good. This is due to the need to keep a positive work relationship.In conclusion, ethical guidelines and moral guidelines have to be followed while dealing with big data.
Read more at https://brainly.com/question/24284924?referrer=searchResults
Read the passage. What does it help you understand about how Manjiro’s character has developed?
Answer:
The passage shows that Manjiro is thinking more independently than he did at the beginning of the story. he is not as influenced by the fears and ideas common in his culture; instead, he recognizes that the "barbarians" on the ship are simply people just like him.
Explanation:
It is correct
Consider the following code: x = 9 y = -3 z = 2 print ((x + y) * z) What is output?
Write a recursive method called lengthOfLongestSubsequence(a, b) that calculates the length of the longest common subsequence (lcs) of two strings. For example, given the two strings aaacommonbbb and xxxcommonzzz the lcs is common which is 6 characters long so your function would return 6. The length of the lcs of two strings a
Answer:
Explanation:
The following code is written in Java and creates the recursive function to find the longest common substring as requested.
static int lengthOfLongestSubsequence(String X, String Y) {
int m = X.length();
int n = Y.length();
if (m == 0 || n == 0) {
return 0;
}
if (X.charAt(m - 1) == Y.charAt(n - 1)) {
return 1 + lengthOfLongestSubsequence(X, Y);
} else {
return Math.max(lengthOfLongestSubsequence(X, Y),
lengthOfLongestSubsequence(X, Y));
}
}
Objective
Make a function that solves the quadratic equation, outputting both values of X. You do not have to worry about imaginary numbers. That is, I will only use input that creates a real output (such as the example screenshots).
NOTE: A function that uses the C version of pass by reference is required to get full credit on this assignment. The C++ form of pass by reference will receive no credit.
Details
STEP 1
#include at the top of your file so that you can use the sqrt function. The sqrt function calculates the square root. For example:
int x = sqrt(9.0)
Will leave x with the value 3, which is the square root of 9.
STEP 2
Define a function THAT USES PASS BY REFERENCE to take in three double inputs and provides two double outputs. In the equations below I use a, b, and c as the double input names and x1 and x2 as the output names.
Inside this function solve the quadratic equation for both possible values of x:
X 1 = − b + b 2 − 4 a c 2 a
That is, X1 is equal to -b + sqrt(b * b - 4 * a * c) then divide all of that by 2 * a.
X 2 = − b − b 2 − 4 a c 2 a
That is, X2 is equal to -b - sqrt(b * b - 4 * a * c) then divide all of that by 2 * a.
Note the difference. One adds sqrt(b * b - 4 * a * c) and the other subtracts it.
This can be done in several lines of code if you want or you can attempt to perform the entire calculation in one line of code.
STEP 3
In the main function read in 3 inputs from the user. Pass these inputs to the quadratic equation function along with the pass by reference variables for the output. Print the results to the screen.
Advice
Your quadratic equation function does NOT need to account for imaginary numbers. Stick with the example inputs to test your code.
If you get NAN that means your equation has an imaginary solution. Do not worry about it. Try different inputs.
The calculation itself is a minor portion of this grade. The majority of the grade comes from implementing pass by reference so make sure you have that part correct.
b2 is simple enough that you do not need to call the pow() function to calculate the power. Instead multiply b * b.
You may want to calculate the numerator into one variable and the denominator into another. You don't have to solve the entire equation on one line (though that is possible).
Since you are using pass by reference you can make the QuadraticEquation function into a void function. It does not need to return anything since it is returning calculations via pointers.
Use scanf on one variable at a time. Don't forget to use double data types and %lf with scanf.
Answer:
In C
#include <stdio.h>
#include<math.h>
void myfunc(double *a, double *b, double *c) {
double x1, x2;
x1 = (-(*b) + sqrt((*b)*(*b)- 4*(*a)*(*c)))/(2*(*a));
x2 = (-(*b) - sqrt((*b)*(*b) - 4*(*a)*(*c)))/(2*(*a));
printf("x1 = %f\n",x1);
printf("x2 = %f\n",x2);}
int main () {
double a,b,c;
printf("a: "); scanf("%lf", &a);
printf("b: "); scanf("%lf", &b);
printf("c: "); scanf("%lf", &c);
myfunc(&a, &b, &c);
return 0;}
Explanation:
#include <stdio.h>
#include<math.h> --- This represents step 1
Step 2 begins here
This gets the values of a, b and c from main by reference
void myfunc(double *a, double *b, double *c) {
This declares x1 and x2
double x1, x2;
Calculate x1
x1 = (-(*b) + sqrt((*b)*(*b)- 4*(*a)*(*c)))/(2*(*a));
Calculate x2
x2 = (-(*b) - sqrt((*b)*(*b) - 4*(*a)*(*c)))/(2*(*a));
Print x1
printf("x1 = %f\n",x1);
Print x2
printf("x2 = %f\n",x2);}
Step 3 begins here
int main () {
Declare a, b and c as double
double a,b,c;
Get input for a, b and c
printf("a: "); scanf("%lf", &a);
printf("b: "); scanf("%lf", &b);
printf("c: "); scanf("%lf", &c);
Call the function to calculate and print x1 and x2
myfunc(&a, &b, &c);
return 0;}
importance of information
literay to the society
Explanation:
Information literacy is important for today's learners, it promotes problem solving approaches and thinking skills – asking questions and seeking answers, finding information, forming opinions, evaluateing sources, and making decisions fostering successful learners, effective contributors, and confident individuals.Let's consider a long, quiet country road with houses scattered very sparsely along it. (We can picture the road as a long line segment, with an eastern endpoint and a western endpoint.) Further, let's suppose that despite the bucolic setting, the residents of all these houses are avid cell phone users. You want to place cell phone base stations at certain points along the road, so that every house is within four miles of one of the base stations. Give an efficient algorithm that achieves this goal, using as few base stations as possible.
Answer:
Follows are the solution to these question:
Explanation:
A simple gullible algorithm is present. Let h mark the house to the left. Then we put a base station about 4 kilometers to the right. Now delete and repeat all the houses protected by this base station. In this algorithm, they can simply be seen to position baselines at b1, . . , bk as well as other algorithms (which may be an optimum algorithm) at [tex]b'_{1}, \ . . . . . . ,b'_{k'}[/tex] and so on. (from left to right) [tex]b_1 \geq b'_{1},\ \ b_2 \geq b'_{2}[/tex] That's why [tex]k \leq k'[/tex].
Write as many accurate and relevant statements about the following prompt as you can think of. You are free to use any of the resources provided to you. Drawings with descriptions of their meanings can be considered a response. A total of 5 correct responses will provide full credit for the assignment and incorrect responses will not effect the number of points received on the exercise.
Answer:
1. The structure is prone to hydrophobic interaction due to the presence of a hydrophobic side chain.
2. The amino acid side chain can form hydrogen bonds due to the presence of hydrogen and nitrogen.
3. It is the primary structure of proteins (polypeptides)
4. With the presence of sulfur in the amino acid, disulfide linkage can be formed.
5. Both structures are Cysteine and histidine side chains of amino acids.
Explanation:
Proteins are organic materials. The two structures are the primary structures of the primary protein molecule which is the amino acid. They can be found in both plants and animals as it promotes cellular regeneration of damaged tissues and cell and the development of organs in living things. It is also found naturally in other materials in our enviroment.
what is difference between computer and smartphone
Answer: One is smaller than the other.
Create the following SQL Server queries that access the Northwind database. Place them in a zip file and place the zip file in the "drop box" for Assignment 5. Name the queries Query 1-MP5, Query2-MP5, etc. Note: These problems all require aggregate processing with GROUP BY
1. For each employee, list the employee ID, employee first name, employee last name, and count of orders taken in 1996. Place the list in descending order by the number of orders.
2. For all orders shipped in July or August, 1996, list the order ID, company name, order date, and total cost of all items ordered. Place the list in descending order by the total cost
3. For all customers from the USA, list the customer ID, company name, state, count of orders, and total order amount. Do not consider the discount. Place the list in order by state and then customer ID.
4. Same as problem 3 but limit the list to all customers who placed 3 or more orders.
5. For all items in the Grains/Cereals category, list the product ID, product name, supplier name, and last date that the product was ordered. Order the list by supplier name and product name (Hint: Use MAX and be sure to include all necessary tables)
6. The product ID, product name, and count of distinct customers who ordered that product in 1996. Place the list in descending order by the count of customers.
Answer:
1. SELECT e.EmployeeID, e.FirstName, e.LastName, COUNT(*) as OrderByEmployee FROM Employees e
JOIN Orders o
ON e.EmployeeID = o.EmployeeID
WHERE YEAR(o.OrderDate) = '1996'
GROUP BY e.EmployeeID,e.FirstName,e.LastName
ORDER BY OrderByEmployee DESC
2. SELECT o.OrderID,c.CustomerID, o.OrderDate,SUM((od.Quantity)*
od.UnitPrice - od.Discount)) as TotalCost FROM Orders o
JOIN [Order Details] od
ON od.OrderID = o.OrderID
JOIN Customers c
ON o.CustomerID = c.CustomerID
WHERE (MONTH(OrderDate)= 7 OR MONTH(OrderDate) = 8) and
YEAR(OrderDate) = 1996
GROUP BY o.OrderID,c.CustomerID, o.OrderDate
ORDER BY TotalCost DESC
3. SELECT c.CustomerID, c.CompanyName, c.City, COUNT(o.OrderID) as TotalOrder, SUM(od.Quantity* od.UnitPrice) as TotalOrderAmount FROM Customers c
JOIN Orders o
ON o.CustomerID = c.CustomerID
JOIN [Order Details] od
ON od.OrderID = o.OrderID
WHERE c.Country = 'USA'
GROUP BY c.CustomerID, c.CompanyName, c.City
ORDER BY c.City, c.CustomerID
4. SELECT c.CustomerID, c.CompanyName, c.City, COUNT(o.OrderID) as TotalOrder, SUM(od.Quantity* od.UnitPrice) as TotalOrderAmount FROM Customers c
JOIN Orders o
ON o.CustomerID = c.CustomerID
JOIN [Order Details] od
ON od.OrderID = o.OrderID
WHERE c.Country = 'USA'
GROUP BY c.CustomerID, c.CompanyName, c.City
HAVING COUNT(o.OrderID) > 3
ORDER BY c.City, c.CustomerID
5. SELECT p.ProductID, p.ProductName, s.ContactName as SupplierName, MAX(o.OrderDate) as LastOrderDateOfProduct FROM Products p
JOIN Categories c
ON c.CategoryID = p.CategoryID
JOIN Suppliers s
ON s.SupplierID = p.SupplierID
JOIN [Order Details] od
ON od.ProductID = p.ProductID
JOIN Orders o
ON o.OrderID = od.OrderID
where c.CategoryName = 'Grains/Cereals'
GROUP BY p.ProductID, p.ProductName, s.ContactName
ORDER BY SupplierName, p.ProductName
6. SELECT p.ProductID, p.ProductName, Count(DISTINCT c.CustomerID ) as OrderByThisManyDistinctCustomer
FROM Products p
JOIN [Order Details] od
ON od.ProductID = p.ProductID
JOIN Orders o
ON o.OrderID = od.OrderID
JOIN Customers c
ON c.CustomerID = o.CustomerID
where YEAR(o.OrderDate) = 1996
GROUP BY p.ProductID, p.ProductName
Explanation:
The six query statements returns data from the SQL server Northwind database. Note that all the return data are grouped together, this is done with the 'GROUP BY' Sql clause.
)Assume passwords are limited to the use of the 95 printable ASCII characters and that all passwords are 10 characters in length. Assume a password cracker with an encryption rate of 6.4 million encryptions per second. How long will it take to test exhaustively all possible passwords on a UNIX system
Answer:
296653 years
Explanation:
The length of password = 10
To get possible password:
95 printable password raised to power 10
= 95¹⁰
Then we calculate time it would take to break password
95¹⁰/6.4million
95¹⁰/6400000
= 9355264675599.67 seconds
From here we get minutes it would take. 60 secs = 1 min
= 9355264675599.67/60
= 155921077927 minutes
From here we get number of hours it would take 1 hr = 60 mins
155921077927/60
= 2598684632 hours
From here we calculate number of days it would take. 24 hrs = 1 day
2598684632/24
= 108278526 days
From here we calculate number of years it would take. 365 days = 1 ye
= 108278526/365
= 296653 years
It would take this number of years to test all possible passwords
What is digital transformation?
Answer:Digital Transformation is the adoption of digital technology to transform services or businesses, through replacing non-digital or manual processes with digital processes or replacing older digital technology with newer digital technology
Explanation:
Answer:
Explanation:
Digital transformation is the process of using digital technologies to transform existing traditional and non-digital business processes and services, or creating new ones, to meet with the evolving market and customer expectations, thus completely altering the way businesses are managed and operated, and how value is delivered to customers
What may make it easy for cybercriminals to commit cybercrimes? Select 2 options.
Cybercrimes are not classified as real crimes, only as virtual crimes.
They operate from countries that do not have strict laws against cybercrime.
They are not physically present when the crime is committed.
The United States has no law enforcement that acts against them.
Law enforcement agencies lack the expertise to investigate them.
Answer: They operate from countries that do not have strict laws against cybercrime.
They are not physically present when the crime is committed.
Explanation:
edg
Answer:
They operate from countries that do not have strict laws against cybercrime.
They are not physically present when the crime is committed.
Explanation:
if a mosquito on the right is moving 10m/s and has kinectic enegry 0.25 j what is the mass
Answer:
Mass = 0.005 kg
Explanation:
Given:
Velocity V = 10 m/s
kinetic energy 0.25 j
Find:
Mass of mosquito
Computation:
K.E = 1/2(m)(v²)
0.25 = 1/2(m)(10²)
0.5 = m x 100
Mass = 0.005 kg
wanna jo.in zo.om
then jo.in
id- 393 303 5214
p.a.s.s.w.ord- 12345
c'monnn
Answer:
No not really...
Explanation:
1. What if im rick roled
2. i dont know u
3. u could be a predator
4. WHAT IF IM RICK ROLED!!!!!!
what is secondary memory?
Answer:
Secondary memory refers to storage devices, such as hard drives and solid state drives. It may also refer to removable storage media, such as USB flash drives, CDs, and DVDs. ... Additionally, secondary memory is non-volatile, meaning it retains its data with or without electrical power.
Computer programming 3
17. Ano ang tawag sa pahina ng Excel?
a. Column
b. Columnar
c. Sheet page
d. Spread sheet
D
Explanation:
D.spread sheet
........,,............:-)
why is an increase in tax rate not necessarily increase government revenue
Answer:
An increase in tax rate raises more revenue than is lost to offsetting worker and investor behavior
Explanation:
Increasing rates beyond T* however would cause people not to work as much or not at all, thereby reducing total tax revenue
Suppose you attend a party. To be sociable, you will shake hands with everyone else. Write the algorithm that will compute the total number of handshakes that occur. (Hint: Upon arrival, each person shakes hands with everyone who is already there. Use the loop to find the total number of handshakes as each person arrives.)
Answer:
Following are the flowchart to the given question:
Explanation: