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]
3 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]3 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
What are the steps to open the Custom AutoFilter dialog box?
uranmaximum [27]

Answer:

data, sort and filter, text filters

Explanation:

ed 2020

7 0
2 years ago
Read 2 more answers
Create the strAnalysis() function that takes 1 string argument and returns a string message. The message will be an analysis of
nydimaria [60]

Answer:

def str_analysis(s):

   if s.isdigit():

       s = int(s)

       if s > 99:

           message = str(s) + " is a pretty big number"

       else:

           message = str(s) + " is a smaller number than expected"

       

   elif s.isalpha():

       message = s + " is all alphabetical characters!"

   else:

           message = "There are multiple character types"

   

   return message;

   

s = input("enter word or integer: ")

while s != "":

   print(str_analysis(s))

   s = input("enter word or integer: ")

Explanation:

- Check if the string is digit, alphabetical, or mixed inside the function

- Ask the user for the input

- Call and print the result of the <em>str_analysis</em> function inside the while loop

- Keep asking for the input until the given string is empty

7 0
3 years ago
Which of the following is the shortcut key combination for pasting copied text?
lys-0071 [83]
Ctrl + v pastes copied text, ctrl + p brings up a print menu, ctrl + x cuts and copies highlighted text, while ctrl + c copies the highlighted text.
3 0
2 years ago
Read 2 more answers
Technician A says that wheel speed sensors are a highly probable cause of illuminated EBC warning lamps. Technician B says that
Blababa [14]

Technician A because

3 0
2 years ago
Which of the following statements isNOT true about abstract data types (ADTs)?A list is anexample of an ADT.ADTs hide theimpleme
Fynjy0 [20]

Answer:

Java provide all the ADTs you need,therefore you do not need to create any newones.

This statement is not true.

Explanation:

ADTs are those data types which we use but we didn't know their inner working that is how it is working what is happening inside.It is commonly used for Data Structures for example:- In stack we use push and pop operations to insert and to delete element from a stack respectively but we didn't know how it is happening inside.How the stack is implemented and etc.Java provides most of the ADT's but not all.

5 0
2 years ago
Other questions:
  • Is a type of bullying that takes place when a person intentionally posts negative information about another that is not true
    8·1 answer
  • Read the PIC Data sheet Chapter 2.0 and 3.0 2. List at least 3 big differences between the Flash and RAM 3. How many RAM locatio
    5·1 answer
  • If $hourlyWage contains the value 10.00 and $hoursWorked contains the value 20, what value will $bonus contain after the followi
    11·1 answer
  • What is a telecomunications system? 1) A system that enables the transmission of data over public or private networks. 2) A comm
    11·1 answer
  • The ____ command creates a subdirectory under a directory. rd md cd ad
    11·1 answer
  • Assuming that we only support BEQ and ADD instructions, discuss how changes in the given latency of this resource affect the cyc
    7·1 answer
  • 7.5 Code practice Plz answer ASAP
    15·1 answer
  • I need help about computer program. Solve C language code...... please​
    7·1 answer
  • What are 6 subtopics on computer programming ?
    13·1 answer
  • Analog computers are general purpose computers : true ? or false ?​
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!