A "Pythagorean Triple" is a set of integers which will make the sides of a right triangle when used in the calculation of Pythagoras’ Theorem. For example, "3, 4, 5" is a Pythagorean Triple. Write a short "C" function that takes three decimal integers and determines if they are a "Pythagorean Triple". The function should return a boolean which is true if the three numbers fit the pattern, and false otherwise. DO NOT write a "main()" method in this code! [15 pts.]

Answers

Answer 1

Answer:

The function in C is as follows:

bool checkPythagoras(int a, int b, int c ){

  bool chk = false;

  if(a*a == b*b + c*c || b*b == a*a + c*c || c*c == b*b + a*a){

      chk = true;

  }

  return chk;

}

Explanation:

This defines the function. It receives three integer parameters a, b and c

bool checkPythagoras(int a, int b, int c ){

This initializes the return value to false

  bool chk = false;

This checks if the three integers are Pythagorean Triple

  if(a*a == b*b + c*c || b*b == a*a + c*c || c*c == b*b + a*a){

If yes, the return value is updated to true

      chk = true;

  }

This returns true or false

  return chk;

}


Related Questions

The speed density fuel injection system uses the blank sensor as the primary sensor as the primary sensor to determine base pulse width

A. Map
B TP
C Maf
D baro

Answers

Answer:

A) Map

Explanation:

All gasoline (petrol) fuel systems need ways or method that will be calculating amount of the air that is entering the engine.This is true as regards mechanical fuel injection, carburetors and electronic fuel injection.Speed density system fall under one of this method. "Speed" in this context means the speed of the engine while "density" means density of the air. The Speed is been measured using the distributor, crankshaft position sensor could be used here. The Density emerge from from measuring of the air pressure which is inside the induction system, using a typical "manifold absolute pressure" (MAP) sensor as well as air temperature sensor. Using pieces of information above, we can calculate

mass flow rate of air entering the engine as well as the correct amount of fuel can be supplied. With this system,

the mass of air can be calculated. One of the drawback if this system is that

Any modification will result to incorrect calculations. Speed-Density can be regarded as method use in estimation of airflow into an engine so that appropriate amount of fuel can be supplied as well as. adequate spark timing. The logic behind Speed-Density is to give prediction of the amount of air ingested by an engine accurately during the induction stroke. Then this information could now be used in calculating how much fuel is required to be provided, This information as well can be used in determining appropriate amount of ignition advance. It should be noted The speed density fuel injection system uses the Map sensor as the primary sensor to determine base pulse width

Find the sum of the values ​​from one to ten using recursion

Answers

Answer:

see picture

Explanation:

The result is 55, which can also be verified using the formula:

(n)(n-1)/2 => 10*9/2 = 55

QUESTION TWO
(50 MARKS)
2.1 Using multi-dimensional arrays, create an array that will store 10 items of stock (can be any item
e.g. cars,) with brand name, Number of stock in Store and Quantity Sold
(25)
NB: Use the While loop to display array elements
E.g.:
Brand name
Number of stock in Store
Quantity Sold
HP
15
28
DELL
14
16
Your output must be in tabular form as above.

Answers

The question is a programming exercise that involves the use of Multi-Dimensional Arrays. See below for the definition of a Multi-Dimensional Array.

What is a Multi-Dimensional Array?

A Multi-Dimensional Array is an array that has over one level and at least two dimensions. You could also state that it is an array that contains a matrix of rows and columns.

How do we create the array indicated in the question?

The array or output table may be created using the following lines of code:


<!DOCTYPE html>

<html>

<head>

 <title>Multi-Dimensional Arrays</title>

 <meta http-equiv="Content-Type" content = "text/html; charset=UTF-8"

</head>

<body>

 <?php

 $cars = array

  (

  array("Volvo", 22, 18),

  array("BMW", 15, 13),

  array("Kia", 5, 2),

  array("Land Rover", 17, 15),

  array("Toyota", 16, 18),

  array("Volkswagen", 20, 10),

  array("Audi", 19, 10),

  array("Mercedes Benz", 50, 5),

  array("Mazda", 11, 12),

  array("Ford", 14, 13),

  );  

 

  echo "<table border =\"1\" style='border-collapse: collapse'>";

  echo '<tr><th>Brand name</th><th>Number of Stock in Store</th><th>Quantity Sold</th></tr>';

 

  foreach($cars as $cars)

  {

   echo '<tr>';

   foreach($cars as $key)

   {

    echo '<td>'.$key.'</td>';

   }

   echo '</tr>';

  }

  echo "</table>";

 ?>

</body>

</html>

See the attached for the result of the code when executed.

Learn more about Multi-Dimensional Arrays at:

https://brainly.com/question/14285075

#SPJ2

Which of the following statements should be avoided when developing a mission statement?
The how-to statements.

Describe the “who, what, and where” of the organization.

Be brief, but comprehensive.

Choose wording that is simple.

Answers

Answer: The how-to statements

Explanation:

The mission statement is simply a short summary of the purpose of a company. It is the guideline on how a company will operate. The mission statement states the reason for the existence of a company, products sold or service rendered and the company's goals.

The mission statement should be brief but comprehensive, consist of simple words and describe the “who, what, and where” of the organization.

Therefore, the incorrect option based on the explanation above is "The how-to statements". This shouldn't be part of the mission statement.

Write a program to generate a square wave with 80% duty cycle on bit P2.7 Microprocessor.​

Answers

Answer:

assuming its assembly (otherwise just delete this ans)

Explanation:

MOV TMOD , #01 ;

MOV TLO, #00 ;

MOV THO, #DCH

CPL P1.5

ACALL DELAY

SJMP HERE

;generate delay using Timer 0

DELAY:

SETB TR0

AGAIN:

JNB TF0 ,AGAIN

CLR TR0

CLR TF0

RET

Q. Describe the T.V. as an ICT tool.​

Answers

Answer:

TV or modern televisions are also a type of ICT tool because we get a wide amount of information about mass communication through the various news channels on the TV. TV is now also the most popular as well as a cheap medium of mass communication.

How can technical writers help readers focus on important information in a set of instructions?
Technical writers can bring a reader's attention to important details in a set of instructions by ___.

1. adding an explanation and caution
2. using a highlighting technique
3. repeating the information
4. adding graphics to the introduction

Answers

Answer:

2. using a highlighting technique

Explanation:

highlighting is for to draw attention

what is an input device​

Answers

In computing, an input device is a piece of equipment used to provide data and control signals to an information processing system such as a computer or information appliance. Examples of input devices include keyboards, mouse, scanners, cameras, joysticks, and microphones.

Create a program which reads in CSV data of Creatures and loads them into aHash Map. The key of this hash map will be the name of each creature. For your hash function, you can simply use the sum of all ASCII values. You can also come up with your own hash function. Your program should present a menu to the user allowing them to look up a creature by name. Additionally, create a function that allows the user to insert a new creature. This creature should be added to the existing hash map. If the name entered by the user already exists, DO NOT ADD IT TO THE HASH MAP. Simply report that the creature already exists. If the creature is unique and successfully added, report the calculated index value. Your hash array should start as size4. You will need to implement a rehashing function to maintain a load factor of 0.75. Collision resolution should be handled via separate chaining with linked lists.
Other Requirements
•Read in a CSV file from the command line when running the program.
•Convert the raw CSV data into the creature struct and add it to a HashMap
•Make sure you properly release all of your allocated memory.
•Format your code consistently.
•Function declarations, structs, and preprocess directives should be placed in a corresponding header file.
•Save your code for this problem ascreature_hash.(c|h).
Creature struct
typedef struct {
char *name;
char *type;
int hp;
int ac;
int speed;
} Creature;
Example Run
1. Search

2. Add Creature

3. Exit

> 1

Enter name: Terrasque

Unable to find "Terrasque"

1. Search

2. Add Creature

3. Exit

> 2

Enter name: Storm Giant

Enter type: Huge giant

Enter HP: 230

Enter AC: 16

Enter speed: 50

Storm Giant added at index 3.

CSV file: Name, hp, ac, speed, type

Rakshasa,110,16,40,Fiend
Priest,27,13,25,Humanoid
Berserker,67,13,30,Humanoid
Fire Elemental,102,13,50,Elemental
Kraken,472,18,20,Monstrosity
Centaur,45,12,50,Monstrosity
Mage,40,12,30,Humanoid
Hell Hound,45,15,50,Fiend
Basilisk,52,15,20,Elemental
Androsphinx,199,17,40,Monstrosity
Efreeti,200,17,40,Elemental
Balor,262,19,40,Fiend
Chain Devil,142,19,40,Fiend
Adult Black Dragon,195,19,80,Dragon
Adult Blue Dragon,225,19,80,Dragon
Adult Red Dragon,256,19,80,Dragon
Please help in C

Answers

Answer:

Explanation:

class TableInput{

    Object key;

    Object value;

    TableInput(Object key, Object value){

       this.key = key;

       this.value = value;

   }

}

abstract class HashTable {

   protected TableInput[] tableInput;

   protected int size;

   HashTable (int size) {

       this.size = size;

       tableInput = new TableInput[size];

       for (int i = 0; i <= size - 1; i++){

           tableInput[i] = null;

       }

   }

   abstract int hash(Object key);

   public abstract void insert(Object key, Object value);

   public abstract Object retrieve(Object key);

}

class ChainedTableInput extends TableInput {

   ChainedTableInput(Object key, Object value){

       super(key, value);

       this.next = null;

   }

    ChainedTableInput next;

}

class ChainedHashTable extends HashTable {

   ChainedHashTable(int size) {

       super(size);

       // TODO Auto-generated constructor stub

   }

   public int hash(Object key){

       return key.hashCode() % size;

   }

   public Object retrieve(Object key){

       ChainedTableInput p;

       p = (ChainedTableInput) tableInput[hash(key)];

       while(p != null && !p.key.equals(key)){

           p = p.next;

       }

       if (p != null){

           return p.value;

       }

       else {

           return null;

       }

   }

   public void insert(Object key, Object value){

       ChainedTableInput entry = new ChainedTableInput(key, value);

       int k = hash(key);

       ChainedTableInput p = (ChainedTableInput) tableInput[k];

       if (p == null){

           tableInput[k] = entry;

           return;

       }

       while(!p.key.equals(key) && p.next != null){

           p = p.next;

       }

       if (!p.key.equals(key)){

           p.next = entry;

       }

   }

   public double distance(Object key1, Object key2){

       final int R = 6373;

       Double lat1 = Double.parseDouble(Object);

   }

   }

Explain how to back up a computer in five steps.

Answers

Answer:

Explanation:

1. Decide what to back up  

If you've stored anything valuable on your hard drive , you'll need to back that up yourself.

 2. Choose backup media  

You'll need to store your backup on a separate form of digital media - such as Go-ogle Drive, One  Drive for Business or an external hard drive

 3. Back up your data  

The backup method will vary depending on your choice of software and operating system Once that's done, schedule regular future backups.

4. Store it safely  

You don't want to lose your PC and your backup. So, be smart and keep your backup somewhere safe.

5. Check that it works

Errors and technical glitches can happen without you even noticing. You may only find out later when you actually need to use that data that something went wrong. Avoid the worry by checking your backups once in a while and confirming that the data is being properly backed up.

convert 10101010 into decimal number system​

Answers

Answer:

170 hope this helps you with

Explanation:

"128 + 0 + 32 + 0 + 8 + 0 + 2 + 0 = 170. So, 170 is the decimal equivalent of the number 10101010."

Describing How to Create a Self-Join Query
Use the drop-down menus to complete the steps for creating a self-join query.
1. Click the
tab.
2. In the Queries group, click Query Design.
3. In the Show Table dialog box, add
4. Click and drag a field from one copy of the table and drop it on the other table.
5. Add the fields to the query.
6. Click
to see the results.
е

Answers

Answer:1. Click the ✔ Create tab.

2. In the Queries group, click Query Design.

3. In the Show Table dialog box, add ✔ the same table twice

.

4. Click and drag a field from one copy of the table and drop it on the other table.

5. Add the fields to the query.

6. Click ✔ Run

to see the results.

Explanation:on edg

Describing How to Create a Self-Join Query Use the drop-down menus to complete the steps for creating a self-join query is by 1. Click the tick in the tab to design a Self-Join Query.

Why can we use self be a part of?

A self-be a part of is a be a part of that may be used to sign up for a desk with itself. Hence, it's miles a unary relation. In a self-be, a part of, every row of the desk is joined with itself and all of the different rows of the equal desk.

The Query and View Designer assigns an alias to the second one example via way of means of including a sequential wide variety to the desk name. In addition, the Query and View Designer creates a be a part of line among the 2 occurrences of the desk or desk-valued item withinside the Diagram pane.

Read more about the Queries :

https://brainly.com/question/25694408

#SPJ2

Understanding Inner Joins
Which records would be returned in a query based on an inner join between a table named Customers and a table
named Orders? Check all that apply.
orphaned orders
orphaned customers
O customers who placed orders
customers who did not place orders
orders that are attached to customers
orders that are not attached to customers

Answers

Answer:  customers who placed orders,  orders that are attached to customers or C E

Explanation: on edg

The records that would returned in a query based on an inner join between a table named Customers and a table named Orders includes:

customers who placed ordersorders that are attached to customers

What is a query?

In a database, this refers to the request for information stored within a database management system that maintains data.

Hence, the "customers who placed orders" and "orders that are attached to customers" will be returned in a query based on an inner join between a table named Customers and a table named Orders

Therefore, the Option C & E is correct.

Read more about query

brainly.com/question/25694408

#SPJ2

What is up with the bots? They are so annoying.

Answers

Answer:

very very very annoying

Answer:

yeah

Explanation:

Using a text editor, create a file that contains a list of at least 15 six-digit account numbers. Read in each account number and display whether it is valid. An account number is valid only if the last digit is equal to the remainder when the sum of the first five digits is divided by 10. For example, the number 223355 is valid because the sum of the first five digits is 15, the remainder when 15 is divided by 10 is 5, and the last digit is 5. Write only valid account numbers to an output file, each on its own line. Save the application as ValidateCheckDigits.java.

Answers

Answer:

Explanation:

The following code is written in Java. It reads every input and checks to see if it is valid. If it is it writes it to the output file.

import java.io.File;

import java.io.FileNotFoundException;

import java.io.FileWriter;

import java.io.IOException;

import java.util.Scanner;

class Brainly {

           public static void main(String[] args) {

               try {

                   File myObj = new File("C:/Users/Gabriel2/AppData/Roaming/JetBrains/IdeaIC2020.2/scratches/input.txt");

                   Scanner myReader = new Scanner(myObj);

                   FileWriter myWriter = new FileWriter("C:/Users/Gabriel2/AppData/Roaming/JetBrains/IdeaIC2020.2/scratches/output.txt");

                   while (myReader.hasNextLine()) {

                       String data = myReader.nextLine();

                       int sum = 0;

                       for (int x = 0; x < 5; x++ ) {

                           sum += data.charAt(x);

                       }

                       int remainder = (sum % 10);

                       System.out.println(remainder);

                       System.out.println(data.charAt(5));

                       if (remainder == Integer.parseInt(String.valueOf(data.charAt(5)))) {

                           System.out.println("entered");

                           try {

                               myWriter.write(data + "\n");

                               System.out.println("Successfully wrote to the file.");

                           } catch (IOException e) {

                               System.out.println("An error occurred.");

                               e.printStackTrace();

                           }

                       }

                       sum = 0;

                   }

                   myWriter.close();

                   myReader.close();

               } catch (FileNotFoundException e) {

                   System.out.println("An error occurred.");

                   e.printStackTrace();

               } catch (IOException e) {

                   e.printStackTrace();

               }

           }

       }

Describing How to Insert a Subdatasheet
Use the drop-down menus to complete the steps for inserting a subdatasheet.
1. Open a table in Design view.
2. Click the
v tab, and in the Records group, click
3. In the drop-down menu, select Subdatasheet.
4. In the Insert Subdatasheet dialog box, select the table you want and click
5. If there is no relationship between the tables, you can
one.
Ve

Answers

Answer:

1. Home

2. More

4. Ok

5. Create

Explanation:

Answer:

1. insert

2. smartart

3. OK

4. close

Explanation:

Create a game that rolls two dies (number from 1 to 6 on the side) sequentially for 10 times (use loop). If at least once out of 10 times the sum of two random numbers is equal to 10, you win, else you loose. You will need to get your own method getRandom(int n) that generates a random number, see below (you can modify it as needed), a loop, and IF statement in the loop that checks if a sum of two random numbers is 10 or not.
Please start your program as follows, similar to what we did in class:
import java.util.Random;
public class UseRandom{
//your method getRandom() is here below, n is a range for a random number from 0 to n
public int getRandom(int n)
{
Random r=new Random();
int rand=r.nextInt(n);
return rand;
}
//code continues here, don't forget your main() method inside the class, and making your own object in main() using "new" keyword.

Answers

Answer:

Explanation:

The following code is written in Java and loops through 10 times. Each time generating 2 random dice rolls. If the sum is 10 it breaks the loop and outputs a "You Win" statement. Otherwise, it outputs "You Lose"

import java.util.Random;

class Brainly {

   public static void main(String[] args) {

       UseRandom useRandom = new UseRandom();

       boolean youWin = false;

       for (int x = 0; x<10; x++) {

           int num1 = useRandom.getRandom(6);

           int num2 = useRandom.getRandom(6);

           if ((num1 + num2) == 10) {

               System.out.println("Number 1: " + num1);

               System.out.println("Number 2: " + num2);

               System.out.println("You Win");

               youWin = true;

               break;

           }

       }

       if (youWin == false) {

           System.out.println("You Lose");

       }

   }

}

class UseRandom{

   public int getRandom(int n)

   {

       Random r=new Random();

       int rand=r.nextInt(n);

       return rand;

   }}

How does an introduction in a set of instructions help an audience of laypeople?

A. It defines unfamiliar terms that are used in the instructions.
B. It provides background information about the instructions.
C. It warns about potential hazards in the instructions.
D. It shows a list of supplies needed to complete the instructions.
E. It cautions against causing damage while carrying out the instructions.

Answers

Answer:

B. It provides background information about the instructions.

Explanation:

It says introduction in a set of audience. A introduction creates a background.

Write a program that prompts the user to enter a series of numbers between 0 and 10 asintegers. The user will enter all numbers on a single line, and scores will be separatedby spaces. You cannot assume the user will supply valid integers, nor can you assumethat they will enter positive numbers, so make sure that you validate your data. You donot need to re-prompt the user once they have entered a single line of data. Once youhave collected this data you should compute the following: • The largest value • Thesmallest value • The range of values • The mode (the value that occurs the most often) •A histogram that visualizes the frequency of each number Here’s a sample running of theprogram.

Answers

Answer:

The program in Python is as follows:

import collections

from collections import Counter

from itertools import groupby

import statistics

str_input = input("Enter a series of numbers separated by space: ")

num_input = str_input.split(" ")

numList = []

for num in num_input:

         if(num.lstrip('-').isdigit()):

                   if num[0] == "-" or int(num)>10:

                             print(num," is out of bound - rejecting")

                   else:

                             print(num," is valid - accepting")

                             numList.append(int(num))

         else:

                   print(num," is not a number")

print("Largest number: ",max(numList))

print("Smallest number: ",min(numList))

print("Range: ",(max(numList) - min(numList)))

print("Mode: ",end = " ")

freqs = groupby(Counter(numList).most_common(), lambda x:x[1])

print([val for val,count in next(freqs)[1]])

count_freq = {}

count_freq = collections.Counter(numList)

for item in count_freq:

         print(item, end = " ")

         lent= int(count_freq[item])

         for i in range(lent):

                   print("#",end=" ")

print()

Explanation:

See attachment for program source file where comments are used as explanation. (Lines that begin with # are comments)

The frequency polygon is printed using #'s to represent the frequency of each list element

Einstein's famous equation states that the energy in an object at rest equals its mass times the squar of the speed of light. (The speed of light is 300,000,000 m/s.) Complete the skeleton code below so that it: Accepts the mass of an object [remember to convert the input string to a number, in this case, a float). Calculate the energy, e Prints e Code Full Screen code.py' New m-str. input('Input m: 1 ') # d not change this line change m str to a float # remember you need c s Iine 8 print("e:", e) # do not change Save & Run Tests

Answers

Answer:

The complete program is as follows:

m_str = input('Input m: ')

mass = float(m_str)

e = mass * 300000000**2

print("e = ",e)

Explanation:

This is an unchanged part of the program

m_str = input('Input m: ')

This converts m_str to float

mass = float(m_str)

This calculates the energy, e

e = mass * 300000000**2

This is an unchanged part of the program

print("e = ",e)

com to enjoy dont give fkin lecture hsb-tnug-fyt​

Answers

Answer:

This is my faverrrrate part of computer science lol.

Explanation:

Complete the Rectangle class. It has a rectangle's length and width as class variables and contains methods to compute its area and perimeter. If either parameter is negative, the method should calculate based on its absolute value. Then, you'll take user inputs to create an instance of Rectangle. For example, if you provide the input -13 7 You should receive the output Perimeter = 40.0 Area = 91.0 Note: It is NOT necessary to use the math module to calculate absolute value, though you may if you want. 298800.1775650.qx3zqy7 LAB ACTIVITY 28.4.1: Final Exam 2021 - Problem 4 of 6 0/10 main.py Load default template... 1 class Rectangle: _init__(self, length, width): # your code here 4 5 def area (self): 6 # your code here 7 8 def perimeter (self): 9 # your code here 10 11 if _name__ == '__main__': 12 1 = float(input) 13 w = float(input) 14 r = Rectangle(1, w) 15 print("Perimeter =', r.perimeter()) 16 print('Area =', r.area(), end='')|

Answers

Answer:

The complete program is as follows:

class Rectangle:

   def __init__(self, length, width):

       self.width = abs(width)

       self.length = abs(length)

   def area(self):

       area = self.length * self.width

       return area

   def perimeter (self):

       perimeter = 2 * (self.length + self.width)

       return perimeter

if __name__ == '__main__':

   l = float(input(": "))

   w = float(input(": "))

   r = Rectangle(l, w)

   print('Perimeter =', r.perimeter())

   print('Area =', r.area(), end='')

Explanation:

This defines the class:

class Rectangle:

This gets the parameters from maiin

   def __init__(self, length, width):

This sets the width

       self.width = abs(width)

This sets the length

       self.length = abs(length)

The area function begins here

   def area(self):

Calculate the area

       area = self.length * self.width

Return the calculated area back to main

       return area

The perimeter function begins here

   def perimeter (self):

Calculate the perimeter

       perimeter = 2 * (self.length + self.width)

Return the calculated perimeter back to main

       return perimeter

The main begins here

if __name__ == '__main__':

This gets input for length

   l = float(input(": "))

This gets input for width

   w = float(input(": "))

This passes the inputs to the class

   r = Rectangle(l, w)

This prints the returned value for perimeter

   print('Perimeter =', r.perimeter())

This prints the returned value for area

   print('Area =', r.area(), end='')

Which of the following is NOT an example of a metasearch engine?

Answers

Answer:

Where is the choices mate?

please help me ASAP!

Answers

Answer:

loser

Explanation:

The answer is B. The crisis management plan acts as net for any sudden crises and provides aid to the issue.

3.This exercise considers the implementation of search algorithms in Prolog. Suppose that successor(X,Y) is true when state Y is a successor of state X; and that goal(X) is true when X is a goal state. Write a definition for solve(X,P), which means that P is a path (list of states) beginning with X, ending in a goal state, and consisting of a sequence of legal steps as defined by {\tt successor}. You will find that depth-first search is the easiest way to do this. How easy would it be to add heuristic search control

Answers

Answer:

c

Explanation:

State the items that will be examined when performing a binary search for Monkey,
which is not in the list.

Answers

The items that will be examined when performing a binary search for monkeys are Antelope, Baboon, Cheetah, Elephant, and Giraffe in the first half of the cycle.

What is binary search?

A search algorithm known as binary search in computer science, also known as half-interval search, logarithmic lookup, or binary chop, asserts to have discovered the location of a target value within a sorted array.

The target value is compared to the middle element of the array using binary search. A successful approach for finding an item in a sorted list of elements is binary search.

Therefore, in the first half of the cycle, the following objects will be looked at when conducting a binary search for monkeys: antelope, baboon, cheetah, elephant, and giraffe.

To learn more about binary search, refer to the link:

https://brainly.com/question/12946457

#SPJ1

We can cluster in one dimension as well as in many dimensions. In this problem, we are going to cluster numbers on the real line. The particular numbers (data points) are 1, 4, 9, 16, 25, 36, 49, 64, 81, and 100, i.e., the squares of 1 through 10. We shall use a k-means algorithm, with two clusters. You can verify easily that no matter which two points we choose as the initial centroids, some prefix of the sequence of squares will go into the cluster of the smaller and the remaining suffix goes into the other cluster. As a result, there are only nine different clusterings that can be achieved, ranging from {1}{4,9,...,100} through {1,4,...,81} {100}. We then go through a reclustering phase, where the centroids of the two clusters are recalculated and all points are reassigned to the nearer of the two new centroids. For each of the nine possible clusterings, calculate how many points are reclassified during the reclustering phase. Identify in the list below the pair of initial centroids that results in exactly one point being reclassified.
a) 36 and 64
b) 36 and 100
c) 4 and 16
d) 4 and 81

Answers


A is the answer because I’m good

The list of the pair of initial centroids that results in exactly one point being reclassified is 36 and 64. The correct option is a.

What is the real line?

A real axis, or a line with a set scale so that each real number corresponds to a distinct point on the line, is the most popular definition of "real line." The complex plane is a two-dimensional extension of the real line.

A cluster is a collection or grouping of items in a certain place. Mathematicians define a cluster as data accumulating around a single value, specifically a number. On a table or graph, a cluster can be seen visually where the data points are grouped together.

The numbers are 4, 9, 16, 25, 36, 49, 64, 81, and 100. In the real line, it will be 36 and 64.

Therefore, the correct option is a. 36 and 64.

To learn more about real line, refer to the link:

https://brainly.com/question/19571357

#SPJ2

Plz answer it’s timed

Answers

Answer: the third one

Explanation:

just trust me, the other ones dont mke sense to what I know about the subject, which is a lot

The given SQL creates a song table and inserts three songs.
Write three UPDATE statements to make the following changes:
Change the title from 'One' to 'With Or Without You'.
Change the artist from 'The Righteous Brothers' to 'Aritha Franklin'.
Change the release years of all songs after 1990 to 2021.
Run your solution and verify the songs in the result table reflect the changes above.
CREATE TABLE song (
song_id INT,
title VARCHAR(60),
artist VARCHAR(60),
release_year INT,
PRIMARY KEY (song_id)
);
INSERT INTO song VALUES
(100, 'Blinding Lights', 'The Weeknd', 2019),
(200, 'One', 'U2', 1991),
(300, 'You\'ve Lost That Lovin\' Feeling', 'The Righteous Brothers', 1964),
(400, 'Johnny B. Goode', 'Chuck Berry', 1958);
-- Write your UPDATE statements here:
SELECT *
FROM song;

Answers

Answer:

UPDATE song SET title = 'With Or Without You' WHERE song_ID = 200UPDATE song SET artist = 'Aritha Franklin' WHERE song_ID = 300UPDATE song SET release_year = 2021 WHERE release_year > 1990

Explanation:

Given

The above table definition

Required

Statement to update the table

The syntax of an update statement is:

UPDATE table-name SET column-name = 'value' WHERE column-name = 'value'

Using the above syntax, the right statements is as follows:

UPDATE song SET title = 'With Or Without You' WHERE song_ID = 200

The above sets the title to 'With Or Without You' where song id is 200

UPDATE song SET artist = 'Aritha Franklin' WHERE song_ID = 300

The above sets the artist to 'Aritha' where song id is 300

UPDATE song SET release_year = 2021 WHERE release_year > 1990

The above sets the release year to '2021' for all release year greater than 1990

Complete main() to read dates from input, one date per line. Each date's format must be as follows: March 1, 1990. Any date not following that format is incorrect and should be ignored. Use the substring() method to parse the string and extract the date. The input ends with -1 on a line alone. Output each correct date as: 3/1/1990. Ex: If the input is:

Answers

Answer:

Explanation:

The following code was written in Java it creates a switch statement for all the month values in order to turn them from Strings into integer values. Then it reads every line of input places them into an array of dates if they are the correct input format, and loops through the array changing every date into the correct output format.Ouput can be seen in the attached picture below.

import java.util.ArrayList;

import java.util.Scanner;

class Brainly {

   public static int intForMonth(String monthString) {

       int monthValue;

       switch (monthString) {

           case "January": monthValue = 1;

               break;

           case "February": monthValue = 2;

               break;

           case "March": monthValue = 3;

               break;

           case "April": monthValue = 4;

               break;

           case "May": monthValue = 5;

               break;

           case "June": monthValue = 6;

               break;

           case "July": monthValue = 7;

               break;

           case "August": monthValue = 8;

               break;

           case "September": monthValue = 9;

               break;

           case "October": monthValue = 10;

               break;

           case "November": monthValue = 11;

               break;

           case "December": monthValue = 12;

               break;

           default: monthValue = 00;

       }

       return monthValue;

   }

   public static void main(String[] args) {

       Scanner scnr = new Scanner(System.in);

       ArrayList<String> dates = new ArrayList<>();

       String date;

       String month;

       String day;

       String year;

       int i = 0;

       while (true) {

           date = scnr.nextLine();

           if (date.equals("-1")) {

               break;

           }

           dates.add(date);

       }

       for (i = 0; i < dates.size(); i++) {

           try {

               month = dates.get(i).substring(0, dates.get(i).indexOf(" "));

               day = dates.get(i).substring(dates.get(i).indexOf(" ") + 1, dates.get(i).indexOf(","));

               year = dates.get(i).substring(dates.get(i).indexOf(",") + 2, dates.get(i).length());

               System.out.println(intForMonth(month) + "/" + day + "/" + year);

           } catch (Exception e) {}

       }

   }

}

Other Questions
The quality control manager of at Long John Silver's restaurant wants to analyze the length of time that a car spends at the drive-thru window waiting for an order. It is determined that the mean time spent at the window is 59.3 seconds with a standard deviation of 13.1 seconds. The distribution of time at the window is skewed right. The quality control manager wishes to use a new delivery system designed to get cars through the drive-thru system faster. A random sample of 40 cars results in a sample mean time spent at the window of 56.8 seconds. What is the probability of obtaining a sample mean of 56.8 seconds or less, assuming that the population mean is 59.3 seconds A 100kg linebacker runs with a velocity of 5m/s towards an 88kg quarterback, who begins to back upwith a velocity of 2m/s to avoid being sackeda.What is the momentum of the linebacker-quarterback system?b.the quarterback is unsuccessful in evading the linebacker and gets sacked. what is the velocity of the football players just after the linebacker dives in for a tackle if the 2 players move as one clump? how do you find the height of a triangle (to calculate area)? Dawn is going scuba diving. Which situation would be modeled by a positive number?on the dive boat deckat the water lineunderwater near a reefon the ocean floor What is embedded in the phospholipid bilayer that helps in the movement of larger molecules ?A.Channel/Transport proteinsB.SaltC.WaterD.Fats The Geneva Convention established rules for __________. Memorial Day was originally established to honor:A Deceased soldiersB Living veterans Civilian volunteersD Foreign allies Please help. Determine which lines are parallel and which are perpendicular. Explain your reasoning. Convert 81 to radians. im in 10 grade what was the point in the civil war and the meaning of it 60. Calculate the mean absolute deviation of the values below, by answering each question.1, 4, 21, 4, 35, 20, 3 and 8Complete the table of values, finding the distance of each value from the mean. Michaels favorite cereal is Cinnamon Toast Crunch. His mom buys him a big box for a special treat, and he wants to figure out exactly how much cereal is in the box. The box has a volume of 384 cubic inches. The height is 12 inches and the length is 8 inches. What is the width? why do you think people believe in fake news Infant Sorrow by William Blake My mother groand! my father wept. Into the dangerous world I leapt, Helpless, naked, piping loud; Like a fiend hid in a cloud. Struggling in my fathers hands, Striving against my swaddling bands; Bound and weary, I thought best To sulk upon my mothers breast.Which stereotype is not supported in Infant Sorrow?the acceptance of ones destinythe joy of new lifea childs love for its parents Read the excerpt from The Time Traveler's Guide to Elizabethan England. In 1574 the city authorities are given powers to restrict playhouses, forcing the actors to find new premises in the suburbs. This becomes a golden opportunity for John Brayne and his brother-in-law, James Burbage, who in 1576 build a new theater, simply called The Theatre, at Shoreditch, just half a mile north of Bishopsgate. The following year a second theater, the Curtain, is built just two hundred yards away. Despite some heavy opposition from Puritan preachers and moralists, both theaters are successful. Which event happened third PLEASE ANSWERRRRRRRRRRRRRRRRRRRRRRRRRRR What type of air mass forms over Nashville TN Cancelling Dr. SuessRead the following selection from the Introduction (paragraphs 1-6)Sox Dr. Seuss books will no longer be published according to Doctor Seuss Enterprises. It is the business that preserves and protects the author's legacyThe ties being discontinued include "And to Think That I Saw it on Mulberry Street and if i Ran the ZooThe company announced on March 2 that thebooks are being withdrawn from publication. It said this was due to racist and insensitive images in the books.Which word from the paragraph helps you to understand thatinsensitiveDr. Seuss books will no longer be printed? (A) according (B) legacy (Cdiscontinued D Find the are of this compound shape below * how should the Jews people be remembered?