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
GrogVix [38]
3 years ago
7

Write a program that first gets a list of integers from input. The input begins with an integer indicating the number of integer

s that follow. Then, adjust each integer in the list by subtracting the smallest value from all the integers.
Computers and Technology
1 answer:
cluponka [151]3 years ago
8 0

Answer:

The following are the program in the Python Programming Language.

#set variable and get input from user

num = int(input("Enter the number of the data set: "))

#print the following message  

print("Enter the {} numbers:".format(num))

#set empty list type variable

lst = []

#set the for loop

for i in range(num):

 #get the list type input from the user

 n=int(input())

 #add the input in the list

 lst.append(n)

#store the minimum value in the variable

min_val = min(lst)

#print the minimum value of the list

print("The smallest value is:",min_val)

#print the following message

print("The normalized data set is:")

#set loop to print list

for x in lst:

 print(x-min_val)

Explanation:

<u>The following are the description of the program</u>.

  • Firstly, set the variable 'num' in which we get the input from the user and print the following message.
  • Then, set the empty list type variable 'lst' in which we get input from the user through the for loop.
  • Set variable 'min_val' in which we store the minimum value of the list.
  • Then, print the minimum value of the list and print the following message.
  • Finally, set the for loop that prints the list after the deduction by the minimum value of the list.
You might be interested in
Create a class called Fraction. Provide a constructor that takes 2 integers. Provide methods for:
tekilochka [14]

Answer:

Explanation;

else

System.out.println("f1 and f2 are not equal");

switch (input.charAt(0)

{

case '+':

f3 = f1.add(f2);

System.out.println("f1+f2=" + f3);

break;

case '-':

f3 = f1.subtract(f2);

System.out.println("f1-f2=" + f3);

break;

case '*':

f3 = f1.multiply(f2);

System.out.println("f1*f2="+f3);

break;

case '/':

f3 = f1.divide(f2);

System.out.println("f1/f2="+f3);

break;

default:

System.out.println("Illegal command: " + input );

break;

}

}// end of while loop

} // end of main

}

 

Note ; this is the last part of the programme check the attachment from 1-5  this is the 6th .

8 0
3 years ago
What are some ways in which reading and writing have changed in our newly networked world
olga_2 [115]
Reading and writing have given us both a way to pass on knowledge and learn things we cant learn first hand.<span />
3 0
3 years ago
Computers are able to think like human beings
Nadusha1986 [10]

Answer:

I don't understand the question

6 0
3 years ago
The security administrator for Corp wants to provide wireless access for employees as well as guests. Multiple wireless access p
Artemon [7]
It’s B I took the test
7 0
3 years ago
Answer this and you get free 100 points
Agata [3.3K]

Answer:

thanks my dude I needed it

5 0
3 years ago
Read 2 more answers
Other questions:
  • Does functionality provided by the app play an important role in a decision to
    13·1 answer
  • Give your definition of a view. Based on the Academic Database, identify and describe a scenario where it would be necessary to
    10·1 answer
  • Write an application that determines which, if any, of the following files are stored in the folder where you have saved the exe
    10·1 answer
  • Command create database in oracle database ::((
    8·1 answer
  • 1. What are you going to do if someone ask for your personal information online?​
    12·2 answers
  • Which four of the following qualify as fair use?
    11·2 answers
  • Computer science - algorithms - flowcharts
    11·1 answer
  • Read the scenario below, and then choose the right type of computer for each person from the drop-down menus. Three of your frie
    12·1 answer
  • A _____ is the viewing area for a web page, which is much smaller on a phone than on a traditional desktop.
    7·1 answer
  • With _____ technology, a web server delivers information to users, who have signed up for the service, instead of waiting for th
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!