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
Recall that the name of a transport-layer packet is segment and that the name of a link-layer packet is frame. What is the name
AlladinOne [14]

Answer:

A network-layer packet is a data gram. A router forwards a packet based on the packet's IP (layer 3) address. A link-layer switch forwards a packet based on the packet's MAC (layer 2) address.

Explanation:

When the end system receives the unstructured bit stream from the physical wire, each layer removes the header information applicable to it until the application receives the data.

1. An application, such as an email program, creates data that will be sent by an end user, such as an email message. The Application layer places a header (encapsulation) field that contains information such as screen size and fonts, and passes the data to the Presentation layer.

2. The Presentation layer places layer 6 header information. For example, the text in the message might be converted to ASCII. The Presentation layer will then pass the new data to the Session layer (layer 5).

3. The Session layer follows the same process by adding layer 5 header information, such as information that the Session layer will manage the data flow, and passes this data to the Transport layer (layer 4).

4. The Transport layer places layer 4 information, such as an acknowledgement that the segment was received in the header, and passes it to the Network layer (layer 3).

5. The Network layer places layer 3 header information, such as the source and destination address so the Network layer can determine the best delivery path for the packets, and passes this data to the Data Link layer (layer 2).

6. The Data Link layer places layer 2 header and trailer information, such as a Frame Check Sequence (FCS) to ensure that the information is not corrupt, and passes this new data to the Physical layer (layer 1) for transmission across the media.

7. The bit stream is then transmitted as ones and zeros on the Physical layer. It is at this point that the Physical layer ensures bit synchronisation. Bit synchronisation will ensure the end user data is assembled in the correct order it was sent.

8. Steps 1 through 7 occur in reverse order on the destination device. Device B collects the raw bits from the physical wire and passes them up the

Data Link layer. The Data Link layer removes the headers and trailers and passes the remaining information to the Network layer and so forth until data is received by the Application layer. Eventually, Device B will receive an email notification displaying a message to indicate that a new email message has been received.

5 0
3 years ago
A binary search algorithm is written (as in the modules, for example) which searches a pre-sorted array for some user-defined va
Mazyrski [523]

Answer:

c) it will always return with an answer of 7 or fewer comparisons of data.

Explanation:

As maximum number of comparison in worst case for sorted binary search is log₂n, here n = 100, so maximum search is at least 6.6 which is approximately 7.

4 0
3 years ago
Use the drop-down menu to complete the sentences about the benefits of flowcharts.
mojhsa [17]

Answer:

c,a,c using the drop down menus edge 2021

GOODLUCK

Explanation:

4 0
3 years ago
Write a program that accepts a time as an hour and minute. Add 15 minutes to the time, and output the result. Example 1: Enter t
Liula [17]

Answer:

Explanation:

C++ Code

#include <iostream>

#include <cstdlib>

using namespace std;

int main(){

double hour,minute;

cout<<"Enter Hours :";

cin>>hour;

cout<<"Enter Minutes :";

cin>>minute;

minute = minute+15;

if(minute >=60){

 hour++;  

 minute = minute-60;

}

if(hour>23){

 hour = 0;

}

cout<<"Hour: "<< hour<< " Minutes: "<<minute;

return 0;  

}

Code Explanation

First take hours and minutes as input. Then add 15 into minutes.

If minutes exceeds from 60 then increment into hours and also remove 60 from minutes as hours already incremented.

Then check if hours are greater then 23 then it means new day is start and it should be 0.

Output

Enter Hours :9

Enter Minutes :46

Hour: 10 Minutes: 1

5 0
3 years ago
Should you have a chance to participate in the design and implementation of a new Operating System, what course of action would
elena-s [515]

Answer:

Provide various open source services for users of the operating system.

Explanation:

Operating systems are applications that manages the computer hardware system. It creates a suitable platform for other user and system applications to run with access to the hardware features through a kernel.

The open source applications and services are user software applications that are free for users to customise and share with other users.

6 0
3 years ago
Other questions:
  • In poor weather , you should ___ your following distance.
    12·1 answer
  • A network administrator was told by the Chief Information Officer (CIO) to set up a new office with a network that has redundanc
    7·1 answer
  • What is binary number
    11·1 answer
  • Based on the passage​ and/or drawing on your prior​ knowledge, you realize that an HMO is​ what?
    9·1 answer
  • Some hardware can be added to the computer without having to restart or power down the computer. After a short period of time th
    5·1 answer
  • A customer comes into a computer parts and service store. The customer is looking for a device to help a person with accessibili
    5·1 answer
  • Which hardware component is most suspect if a user can barely make out
    10·1 answer
  • Who put forward the idea of nanotechnology to the world?​
    6·1 answer
  • The function's only behavior should be to return the sum of array userVals' elements. What common error does the function make?
    6·1 answer
  • The software concept ___________and defines a need for the new system.
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!