1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
miskamm [114]
2 years ago
6

Given two objects represented by the tuples (22, 1, 42, 10) and (20, 0, 36, 8):

Computers and Technology
1 answer:
Rudik [331]2 years ago
4 0

Answer:

Given,

P = (22, 1, 42, 10)

Q = (20, 0, 36, 8)

a. Formula for Euclidean Distance :

distance = ((p1-q1)^2 + (p2-q2)^2 + ... + (pn-qn)^2)^(1/2)

Now,

distance = ( (22-20)^2 + (1-0)^2 + (42 - 36)^2 + (10-8)^2) ) ^(1/2)

=( (2)^2 + (1)^2 + (6)^2 + (2)^2 ) ) ^(1/2)

=(4+1+36+4)^(1/2)

=45^(1/2)

Distance = 6.7082

b.Manhattan distance :

d = |x1 - x2| + |y1 - y2|

d = |22- 20| + |1 - 0|

d = |2| + |1|

Explanation:

You might be interested in
Hoda wants to create a new presentation in PowerPoint with existing graphics and designs. What is the easiest and fastest way fo
Paul [167]

Answer: a

Explanation:

6 0
4 years ago
Reverse Word Order: Write a program that reverses the order of the words in a given sentence. This program requires reversing th
Lerok [7]

Answer:

The program in C++ is as follows:

#include <bits/stdc++.h>

using namespace std;

int main(){

string sentence,word="";

getline (cin, sentence);

vector<string> for_reverse;

for (int i = 0; i < sentence.length(); i++){

 if (sentence[i] == ' ')  {

  for_reverse.push_back(word);

  word = "";  }

 else{    word += sentence[i];}  }

for_reverse.push_back(word);

sentence="";

for (int i = for_reverse.size() - 1; i > 0; i--){

 sentence+=for_reverse[i]+" ";}

sentence+=for_reverse[0];

cout<<sentence<<endl;

return 0;

}

Explanation:

This declares sentence and word as strings; word is then initialized to an empty string

string sentence,word="";

This gets input for sentence

getline (cin, sentence);

This creates a string vector to reverse the input sentence

vector<string> for_reverse;

This iterates through the sentence

for (int i = 0; i < sentence.length(); i++){

This pushes each word of the sentence to the vector when space is encountered

<em>  if (sentence[i] == ' ')  { </em>

<em>   for_reverse.push_back(word);</em>

Initialize word to empty string

  word = "";  }

If the encountered character is not a blank space, the character is added to the current word

<em>  else{    word += sentence[i];}  } </em>

This pushes the last word to the vector

for_reverse.push_back(word);  

This initializes sentence to an empty string

sentence="";

This iterates through the vector

for (int i = for_reverse.size() - 1; i > 0; i--){

This generates the reversed sentence

 sentence+=for_reverse[i]+" ";}

This adds the first word to the end of the sentence

sentence+=for_reverse[0];

Print the sentence

cout<<sentence<<endl;

8 0
3 years ago
Which of the following is NOT a best practice to protect data on your mobile computing device?
OleMash [197]

<u>Lock your device screen when not in use and require a password to reactivate</u> is not a best practice to protect data on your mobile computing device.

<h3>What is a mobile computing device?</h3>

Any device that was built using mobile parts, such as mobile hardware and software, is referred to as a mobile computing device. Portable devices that can function like a typical computing device in terms of operation, execution, and provision of services and applications are known as mobile computing devices.

Portable and handheld computing devices are other names for mobile computing devices.

Modern handheld devices that have the hardware and software needed to run common desktop and Web applications are generally referred to as mobile computing devices. Similar hardware and software elements found in personal computers, such as processors, random memory and storage, Wi-Fi, and an operating system, are also found in mobile computing devices. They are made specifically for mobile architecture and portability, which sets them apart from PCS.

Learn more about mobile computing devices

brainly.com/question/8189998


#SPJ1

4 0
1 year ago
What is the most important reason to create a backup of your files somewhere other than your computer
Marizza181 [45]
The most important reason we should make a backup of our files on a USB or other device is in case our computer suddenly dies. If something in it goes bad and it stops working, you will have then lost everything on your computer. But, if you make a save, you can buy another computer and upload everything onto the new one.
6 0
4 years ago
When creating an excel budget and performing what-if analysis, it is generally easiest to ______.
Rufina [12.5K]

When creating an Excel budget and performing what-if analysis, it is generally easiest to create the budget with a budgeting assumption tab

  • Assumptions in a budget brings about projections by adding one's assumptions to the current data.

  • It is very important to create a budgeting assumptions tab when creating a master budget in microsoft excel because it will simplifies the process of getting how changes to a master budget's main assumptions influences all cornered schedules and the projected financial statements of said firm.

Conclusively we can say that Excel budget and performing what-if analysis produces the budget with a budgeting assumption tab

Learn more from

brainly.com/question/17198039

4 0
2 years ago
Other questions:
  • What is a drawback to being in Slide Show mode? a- Being able to review each slide in order
    8·2 answers
  • BITS wants to store information about the supervisors, including their supervisor number and the relationship to consultants. Su
    15·1 answer
  • WordArt styles allow you to add ____.
    9·1 answer
  • 6. Which of the following options is used to view a computer's memory properties?
    8·1 answer
  • What are the Typical application<br>of mini computer​
    5·2 answers
  • Which would a student most likely do in a digital laboratory?
    13·2 answers
  • How Much Memory Did the First Computers Have?
    5·1 answer
  • Problem # 1 [End of chapter problem] The following character encoding is used in a data link protocol: A: 01100111 B: 11110011 F
    14·1 answer
  • Write a program to accept two numbers<br>in two lines and find Square root of Squares<br>of thion​
    13·1 answer
  • Can someone please help me with this ,it is my assignment of technology and agriculture year 8
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!