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
erma4kov [3.2K]
4 years ago
9

When analyzing data sets, such as data for human heights or for human weights, a common step is to adjust the data. This can be

done by normalizing to values between 0 and 1, or throwing away outliers.
For this program, adjust the values by subtracting the smallest value from all the values. The input begins with an integer indicating the number of integers that follow. Assume that the list will always contain less than 20 integers.

Ex: If the input is:

5 30 50 10 70 65
the output is:

20 40 0 60 55
The 5 indicates that there are five values in the list, namely 30, 50, 10, 70, and 65. 10 is the smallest value in the list, so is subtracted from each value in the list.
Computers and Technology
1 answer:
Savatey [412]4 years ago
3 0

Answer:

The program to this question can be defined as follows:

Program:

n = int(input("Enter the number: ")) #input value from user end  

print("Entered value: ",n) #print value

lt = [] #defining an empty list

for i in range(n): # loop to input values  

   lt.append(int(input())) #add values in the list

minimum_value = min(lt) # finding minimum value

print("Smallest value: ",minimum_value) #print value

print("Normalising data: ") #print message

for x in lt: #defining loop normalising value

   print(x-minimum_value) #print normalised values

Output:

Enter the number: 5

Entered value:  5

90

60

30

80

70

Smallest value:  30

Normalising data:  

60

30

0

50

40

Explanation:

In the given code a variable "n" is defined, that input value from the user end, in the next step, an empty list is defined, an two for loop is declared, which calculates the given value.

  • In the first for loop, the append method is used, that input values in the given list, and at the last use the min function, that prints the smallest value in the list, and stores its value in the "minimum_value".
  • In the second for loop, the "minimum_value" variable value is subtracted from the list value and print its values.  
You might be interested in
At the county fair, prizes are awat rded to the five heaviest cows. More than 2000 cows are entered, and their records are store
Sergeu [11.5K]

Answer:

B

Explanation:

selection sort for each pass sorts one element in right place . so we can stop it after 5 passes as we need only 5 heaviest cows info.

Answer is B

6 0
3 years ago
Suppose that x = 1565.683, y = 85.78, and z = 123.982. What is the output of the following statements? cout << fixed <&
strojnjashka [21]

Answer:

The output to the given question is "1565.683 85.7800 123.98".

Explanation:

In the given C++ program there are three variable is defined that is x,y, and z.To print the value of the variable we use the setprecision() function. we use the setprecision() function. It is also known as manipulator setprecision() function. This function used to control the number of digits and display the number of a floating-point value.  The setprecision() function work only with the "<iomanip>" header file.

6 0
3 years ago
In an advanced word processing program which type of image or graphic is available in a variety of formats and styles?
ira [324]
IS it coding?If not sorry
5 0
3 years ago
Read 2 more answers
Higher Order Functions used for simulations of dice rolls. Definition: An n-sided dice function takes no arguments and always re
tiny-mole [99]

Answer:

#include <iostream>

#include <time.h>

#include <string>

using namespace std;

int main(){

srand(time(NULL));

cout<<"Throw dice"<<endl;

int b =0;

int a=0;

a=rand()%6;

b=rand()%6;

for (int i =0;i<1;i++)

{cout<<"dice one: "<<a<<endl;}

for (int i =0;i<1;i++)

{cout<<"dice two: "<<b<<endl;}

if(a>b)

{cout<<"first dice won"<<endl;}

if(b>a)

{cout<<"second dice won"<<endl;}

else{cout<<"they are same"<<endl;

return main();

}

return 0;

}

Explanation:

/*best dice roll game just for you change it as you want but all necessary things are there/*

5 0
3 years ago
A short circuit can cause _______ because there is nothing in the circuit to limit the current and absorb the electrical energy.
Marta_Voda [28]

Answer:

Fire

Explanation:

You'll get a giant spark. The electricity will flow freely causing over-heating or fire.

4 0
3 years ago
Other questions:
  • Which of the following is real job title on the interactive media career pathway?
    12·2 answers
  • Edhesive 4.1 question 1
    9·1 answer
  • A special symbol that is used as an underlining structure to an agenda
    5·1 answer
  • Balance is the design principle that is represented when using the Crop tool?
    6·1 answer
  • What type of link is used to call this file?
    8·1 answer
  • PLEASE help me RIGHT NOW!!!!!!!!! I will give a Brainly to anyone who helps me!
    15·1 answer
  • Operating software is a must in every software (a) True (b) False
    8·1 answer
  • Select the correct answer.
    6·2 answers
  • design a relational database in EER for bike helmets and their reviews. a bike helmet has a name and color attributes. a bike co
    12·1 answer
  • Write any two rules for writing algorithm​
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!