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]
4 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]4 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
I NEED an example of output plssss​
pentagon [3]
What type of output are u looking for
8 0
3 years ago
Write a switch statement that tests the value of the char variable response and performs the following actions: if response is y
Yuri [45]

Answer:

# include<iostream>

#include<conio.h>

using namespace std;

main()

{

char choice;

cout<<"Enter your Choice"

cin>>choice;

switch (choice)

{

case 'y':

cout<<"Your request is being processed";

break;

case 'n':

cout<<"Thank you anyway for your consideration";

break;

case 'h':

cout<<"Sorry, no help is currently available";

default:

cout<<"Incorrect Choice";

break;

}

getch();

}

Explanation:

In this program, a character type variable named as choice is selected for the input. This choice variable can be y, n or h as per requirement of the program. Switch statement is chose for the selection of output statement with respect to its mentioned input.  This program shows the output statement for above mentioned characters. In case of any other character the program returns Incorrect choice and ends.

7 0
3 years ago
Complete the sentence.<br> Python is a_____<br> level language compared to bytecode.
Crazy boy [7]

Answer:

High

Explanation:

Python is high level; Bytecode is intermediate

5 0
3 years ago
Read 2 more answers
A diagram of a flow chart to find the average of 10 numbers​
Nat2105 [25]

Answer:

Kindly check attached picture

Explanation:

Flowchart gives a graphical representation of a steps taken towers the execution of a program.

In the flowchart attached, A variable was initialized and set to 0 ; then a for loop was used to iterate integers 1 up to 10, for each number. It is added to the initialized variable sum until all the 10 integer numbers are added. The the average is obtained by dividing by 10.

4 0
3 years ago
A computer may keep freezing if it's software is up-to-date? <br> True <br> False
tester [92]

Answer:

false

Explanation:

6 0
4 years ago
Other questions:
  • Mitchell has noticed that his co-workers are unable to open attachments in the emails he sends. What is one possible reason for
    5·1 answer
  • What is output with the statement System.out.println(x+y); if x and y are int values where x=10 and y=5? Group of answer choices
    10·1 answer
  • Discuss OPENGL instruction to draw the following drawing primatives:
    14·1 answer
  • Assuming that a year has 365 days, write a class named DayOfYear that takes an integer representing a day of the year and transl
    6·1 answer
  • CHEMISTRY. metal+water》base+...............​
    12·1 answer
  • Write a C++ program that would take 10 integers and outputs mean, median, and range. Create at least three functions: one for so
    7·1 answer
  • A customer seeks to buy a new computer for private use at home. The customer primarily needs the computer to use the Microsoft P
    9·1 answer
  • In a school 50% of the students are younger than 10, 1/20 are 10 years old and 1/10 are older than 10 but younger than 12, the r
    7·1 answer
  • What's the differences between jojoy and moddroid???
    10·1 answer
  • How do you unblock sites on your computer
    14·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!