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
Fittoniya [83]
3 years ago
8

Write a program that extracts the last three items in the list sports and assigns it to the variable last. Make sure to write yo

ur code so that it works no matter how many items are in the list
Computers and Technology
1 answer:
defon3 years ago
7 0

Answer:

sports = ["football", "basketball", "volleyball", "baseball", "swimming"]

last = sports[-3:]

print(last)

Explanation:

*The code is in Python.

Create a list called sports

Create a variable called last and set it to the last three elements of the sports list using slicing

Print the last

You might be interested in
Write a user-defined function that calculates the GPA. For the function name and arguments, use the following: The input argumen
QveST [7]

Answer:

#include <iostream>

#include <vector>

using namespace std;

void calGPA();

vector<int> g;

vector<int> h;

int main(){

   char pushMore = 'y';

   int fg, fh;

   for (;;){

       if (pushMore == 'n'){

           break;

       } else{

           cout<< "Enter integer for grade: ";

           cin>> fg;

           cout<< "Enter integer for credit hours: ";

           cin>> fh;

           g.push_back(fg);

           h.push_back(fh);

           cout<< "Do you want to add more grade and credit hours? y/n: ";

           cin>> pushMore;

       }

   }

   calGPA();

}

void calGPA(){

   double total = 0, GPA;

   for (int i = 0; i < g.size(); ++i) {

        total +=  g.at(i) * h.at(i) ;

   }

   cout<< "The GPA is : "<< total/g.size();

}

Explanation:

The C++ source code above defines two vectors 'g' and 'h'. The latter holds the grades of a student while the former holds the credit hours for the subject taken. The void 'calGPA' function calculates and prints the student's GPA.

7 0
2 years ago
What happens when two computers use the same IP address?
olga nikolaevna [1]

Answer:

Two computers can safely have the same IP address in certain cases. In most cases, if those two computers are on the same local network, it breaks connectivity for one or both of them. Internet protocols work by sending small, individually addressed messages. Each message can be routed differently.

Explanation:

5 0
3 years ago
Read 2 more answers
It is next to impossible for someone to prove that information I used in a class assignment came from somewhere on the Internet/
Rashid [163]

Answer:

False

Explanation:

It is wrong to say that plagiarism can not be detected, there is a wide range of technologies available to prove that the information provided that a person is gotten directly from a source and it was not His own words. Plagiarism checking tools include web applications and software made to check plagiarism and they available for use, most of which are paid software and some are free.

3 0
3 years ago
Learning Task 5. Identify the terms being described below. Write your answer in your answer
Charra [1.4K]

Answer:

1. Waste management.

2. Substitution.

3. Personal hygiene practices.

4. Emergency preparedness.

5. Elimination.

6. Flammability limit.

7. Occupational safety and health (OSH).

8. Engineering controls.

9. Personal protective equipment (PPE).

10. Administrative controls.

Explanation:

1. <u>Waste management</u>: this refers to the collection, transportation, processing or disposal, managing and monitoring of waste materials.

2. <u>Substitution</u>: this refers to the hazard control which involves the measure of replacing one hazardous agent or work process with less dangerous one.

3. <u>Personal hygiene practices</u>: a very important method of controlling hazards which involves proper washing of your hair, skin, body and even your clothes.

4. <u>Emergency preparedness</u>: this refers to the preparedness for the first and immediate response in case of any type of emergency.

5. <u>Elimination</u>: this hazard control refers to the removal of a specific hazard or hazardous work process.

6. <u>Flammability limit</u>: is the term used to call the range of concentration over which a flammable vapor mixed with air will flash or explode if an ignition is present.

7. <u>Occupational safety and health (OSH)</u>: a cross-disciplinary area concerned with protecting the safety, health and welfare of people engaged in work or employment.

8. <u>Engineering controls</u>: the term used in hazard control which involves changing a piece of machinery or work process.

9. <u>Personal protective equipment (PPE)</u>: the term used to call any piece of equipment which is used to protect the different parts of the body such as ears and eyes such as respirators, face mask, face shield, gloves, boots, etcetera.

10. <u>Administrative controls</u>: this is a form of hazard control which involves manipulation of worker/employee’s schedule and job rotation.

7 0
3 years ago
On an ATM network, how is the path that data will take determined?
Bingel [31]

Answer:

The path that data will take is determined by the switches.

Explanation:-

On ATM(Asynchronous Transfer Mode) Network switches determine the optimal path between the sender and the receiver then establish the path between them before the transmission of data.These  switches with the help of algorithm finds the best route for the data transmission.

3 0
3 years ago
Other questions:
  • A disk rotates at a rate of 7200 revolutions per minute. Seek operations (i.e., moving the access head to a desired track) take
    6·1 answer
  • How does microchip work
    12·1 answer
  • RDBMS stands for_________________
    12·1 answer
  • Describe how computer is in the last 35 years
    6·1 answer
  • People use a computer connected to the internet to manage financial accounts
    15·1 answer
  • 1). What is the proper name of the healing agent?
    5·1 answer
  • Where (what memory location) is the data read from for the following code:
    12·1 answer
  • What feature of ntfs allows a file or folder to point to another file or folder located somewhere else in the file system?
    8·1 answer
  • Before you can use a navigation control, you must _____. A. configure the web.config B. configure the global.asax C. configure t
    5·2 answers
  • Overheating of a computer can be easily prevented. Explain how​
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!