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
Nuetrik [128]
3 years ago
9

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:
zhuklara [117]3 years ago
8 0

Answer:

Following is the program in python programming language

sports = [14, 25, 32, 63, 79, 38, -10] #list sports  

print("The original list is : " + str(sports)) #display original list

last = sports[-3:] #extracts the last 3 items from the list

print("The last 3 elements of list is : " + str(last)) #display the last 3 item

Output:

The original list is  : [14, 25, 32, 63, 79, 38, -10]

The last 3 elements of list is: [79, 38, -10]

Explanation:

Following are the description of program

  • Declared and initialized the items in the list "sports".
  • After that display the list "sports" by using str function in the python language
  • sports[-3: this will extract the last 3 three items in the list and store the result in the last variable .
  • Finally display the last variable it will print the last 3 element in the list
You might be interested in
You are the security administrator for your company. You have been informed by human resources that one of the employees in acco
andreyandreev [35.5K]

Answer:

The answer is "option d".

Explanation:

When an employee is fired so, their account should be closed, and the employee records should be maintained over a certain time specified by the rules and procedures of the company. and other options can be defined as:

  • In option a,  It is not important to delete the user account because later on, the company would need info about that account.
  • In option b, There's no need to talk to the superior of the employer.
  • In option c,  change the user password is not enough to update the user's password; the account should also be deleted.
5 0
4 years ago
Define self-esteem: A how I feel about myself B how I visualize myself C how I esteem myself
vitfil [10]

Answer:

A how I feel about myself

Explanation:

Self-esteem is your overall opinion of yourself — how you feel about your abilities and limitations. When you have healthy self-esteem, you feel good about yourself and see yourself as deserving the respect of others. When you have low self-esteem, you put little value on your opinions and ideas.

8 0
3 years ago
Imagine cashing or taking money using the Automated Teller Machine (ATM) and the banking hall, which of these two ways would you
Brut [27]

Imagine cashing or taking money using the Automated Teller Machine (ATM) and the banking hall, the two ways are When it involves convenience, not anything can beat ATMs.

<h3>What are the benefits and drawbacks of the usage of an ATM card?</h3>

No credit score allowed: A debit card is related for your financial institution account. There isn't anyt any opportunity of creating any transaction on credit score. All transactions and withdrawals are restricted to the stability to be had for your account. Difficult to dispute fraudulent use: It is less difficult to fraudulently use your debit card.

Automated Teller Machine (ATM) – It is a digital system that is operated with the aid of using clients and lets in acting for monetary transactions consisting of switch funds, coins withdrawals, and deposits. It extensively utilized for acquiring account facts at any time and with out the assist of financial institution staff.

Read more about the Automated Teller Machine:

brainly.com/question/19185661

#SPJ1

3 0
2 years ago
_ is the use of a collection of computers, often owned by many people or different organizations, to work in a coordinated manne
ddd [48]

Answer:

"Grid computing" is the correct answer for the above question.

Explanation:

  • Grid computing is a process in which many computers are participating to solve a single problem. This type of process is distributed multiple computers to perform a different type of task.
  • If there is large problem and if many computers solve that problem, then that problem is solved easily within a few minutes.
  • This is because many computers are working for that problem.
  • The above question asked about that process in which many computers are working to solve a single problem. This processor is known as "Grid Computing".
8 0
3 years ago
Write a method maxMagnitude() with two integer input parameters that returns the largest magnitude value. Use the method in a pr
antoniya [11.8K]

Answer:

   public static int maxMagnitude(int a, int b){

       int max;

       if (a>b){

           max = a;

       }

       else{

           max = b;

       }

       return max;

   }

The complete program calling the method is given in the explanation section

Explanation:

import java.util.Scanner;

public class ANot {

   public static void main(String[] args) {

     Scanner in = new Scanner(System.in);

       System.out.println("Please Enter two numbers");

       int num1= in.nextInt();

       int num2 = in.nextInt();

       System.out.println("The largest magnitude number is: "+maxMagnitude(num1,num2));

   }

   public static int maxMagnitude(int a, int b){

       int max;

       if (a>b){

           max = a;

       }

       else{

           max = b;

       }

       return max;

   }

}

The maxMagnitude() method uses if/else statement to compare two ints and return the larger one

7 0
3 years ago
Other questions:
  • A new computer virus can enter the system through email or through the internet. There is a 30 % chance of receiving this virus
    11·1 answer
  • Respond to the following in a paragraph of no less than 125 words. What is the purpose of netiquette guidelines?
    10·1 answer
  • The Universal Containers research lab is publishing its latest research into knowledge articles assigned to the data category "C
    15·1 answer
  • What is a office buttom?
    7·1 answer
  • In the list [0, 13, 5.4, "integer"], which element is at index 2?
    11·1 answer
  • What is the difference between mutex lock and race condition​
    6·1 answer
  • Date Time Manipulation Exploration If you start from Jan 1st, 1757, and repeatedly add 8 days, until you hit 1800, how many time
    14·1 answer
  • Practising some questions for board exams for class 12 python,pls help with detailed answer
    14·1 answer
  • Discuss your role as an IT professional in terms of your responsibility to clients, co-workers and society.
    11·1 answer
  • The people, procedures, hardware, software, data, and knowledge needed to develop computer systems and machines that can simulat
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!