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
Which type of shape allows you to add text that can be moved around.
Kipish [7]

Answer:

Move a text box, WordArt, or shape forward or backward in a stack. Click the WordArt, shape, or text box that you want to move up or down in the stack. On the Drawing Tools Format tab, click either Bring Forward or Send Backward.

3 0
2 years ago
Help me. its due tonight
Novosadov [1.4K]
d- enjoy
b- national service !
5 0
2 years ago
Renting provides _________ flexibility but can lead to _________ costs in the long-term.
docker41 [41]
Renting provides greater flexibility but can lead to higher costs in the long term.
3 0
3 years ago
Read 2 more answers
Under which reflection(s) is the image of line m also a line?
lubasha [3.4K]

Answer:

c

Explanation:

5 0
3 years ago
Read 2 more answers
It's not necessary in a field to have .
ozzi

it's not necessary in a field to have .

6 0
2 years ago
Other questions:
  • A url consists of a ____, a domain name, sometimes the path to a specific web page or location in a web page, and the web page n
    11·1 answer
  • What is ment by creative middle way solution
    6·1 answer
  • 2. Suppose you want to write a method that prints a heading on a new output page, along with a page number that is 1 in the firs
    15·1 answer
  • Two different ways to bring up My Computer folder
    11·1 answer
  • How can forms help us reduce data-entry errors?
    12·1 answer
  • A _____ is a number that summarizes an encrypted information. digital certificate hash function message digest hash algorithm
    8·1 answer
  • ¿Quién recibe la orden de ejecución de un programa enviada por el usuario?
    9·1 answer
  • What subject did this person struggle in, "I ain't never gonna nead to no this stuff."
    11·1 answer
  • What is a computer modem?​
    9·1 answer
  • How to enhance the video to full screen in filmora
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!