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
gulaghasi [49]
4 years ago
11

2.24 Write the relevant Python expression or statement, involving a list of numbers lst and using list operators and methods for

these specifications: (a) An expression that evaluates to the index of the middle element of lst (b) An expression that evaluates to the middle element of lst (c) A statement that sorts the list lst in descending order (d) A statement that removes the first number of list lst and puts it at the end 2.25 Add a pair of parentheses to each expression so that it evaluates to True. (a) 0 == 1 == 2 (b) 2 + 3 == 4 + 5 == 7 (c) 1 < -1 == 3 > 4 For each expression, explain i
Computers and Technology
1 answer:
miskamm [114]4 years ago
3 0

Answer:

lst = [11, 603, 99, 7, 582, 1];

print("The index of the middle element: " + str(int(len(lst)/2)))

print("The middle element: " + str(lst[int(len(lst)/2)]))

lst.sort()

sorted_lst = lst.reverse()

print("The list in descending order: " + str(lst))

first_number = lst.pop(0)

lst.append(first_number)

print("New lst: "+ str(lst))

Explanation:

- Initialize a list

- Find the middle index, int(len(lst)/2)

- Find the middle element, lst[int(len(lst)/2)]

- Sort the list in descending order (First sort the list in ascending order than reverse it)

- Get the first element using <em>pop</em> method, and append it to the end using <em>append</em> method

- - - - -

a) 0 == 1 == 2 --> Always evaluates false

b) 2 + (3 == 4) + 5 == 7 --> Evaluates true

c) 1 < -1 == 3 > 4 --> Always evaluates false

You might be interested in
Why was unicode invented
GrogVix [38]
The old system, ASII, was no where near large enough to deal with all the different languages & symbols that exist  
5 0
3 years ago
Read 2 more answers
What are possible challenges for cyber bullying
Anestetic [448]

Answer:

well, you will have your account deleted/ arrested because of cyber bullying

Explanation:

so don't!!! (hint hint XD)

6 0
3 years ago
Read 2 more answers
Why is it important to neglect writing your cover letter
Lana71 [14]
Many college students and recent grads destroy their resumes by accompanying them with halfhearted or downright terrible cover letters. While some employers don't bother reading cover letters, most do. And they will quickly eliminate you if you make these cover letter mistakes
5 0
3 years ago
Read 2 more answers
The three tasks within data harmonization, namely: data consolidation, data cleansing, and data formatting use techniques called
-BARSIC- [3]

The three tasks within data harmonization, namely: data consolidation, data cleansing, and data formatting use techniques called harmonization rules that implement those tasks -The statement is true

Explanation:

Data harmonization refers to the process of combining the data of varying files and formats ,name conventions and columns and transforming the same into one data set.

Data harmonization refers to the process of integrating multiple data source into a single data set.

By adopting the Data harmonization technique we can reduce the problem of redundant data and conflicting standard

The name harmonization is an analogy to the process to harmonizing discordant music.

The goal of data harmonization is to find commonalities, identify critical data that need to be retained, and then provide a common standard.

6 0
4 years ago
Compute the sum of the values in data_array, instead of using the sum() function. To do this, you must "accumulate" a result, wh
Dmitry [639]

Answer:

public class TestClock {

   public static void main(String[] args) {

       int [] data_array = {1,2,3,5,3,1,2,4,5,6,7,5,4,3};

       int data_array_sum =0;

       for(int i=0; i<data_array.length; i++){

           data_array_sum = data_array_sum + data_array[i];

           System.out.println("Acumulating sum is "+data_array_sum);

       }

       System.out.println("Total sum is: "+data_array_sum);

   }

}

Explanation:

Using Java programming language for this problem, we declare and initialize the array with this statement:

int [] data_array = {1,2,3,5,3,1,2,4,5,6,7,5,4,3};

Then created a variable to hold the sum values and initialize to zero:

int data_array_sum =0;

Using a For Loop statement we iterate through the array and sum up the values.

8 0
4 years ago
Other questions:
  • What did you include in your response? Check all that
    15·1 answer
  • __________ is an attempt to gain access to a network by posing as an authorized user in order to find sensitive information, suc
    5·1 answer
  • A tornado may be approaching if you observe which of the following?
    15·1 answer
  • Write a program that, for four points A, B, C and P, which a) Draws a triangle formed by ABC and a small cross showing the posit
    15·1 answer
  • List the six external peripheral parts of a computer system
    8·1 answer
  • The first mechanical computer design in by Charles Babbage was Called​
    5·2 answers
  • Made from fruit juice, water and sugar, The American version contains milk and cream and sometimes egg white​
    9·1 answer
  • Choose the item which best describes the free frame list. 1. a per process data structure of available physical memory 2. a glob
    7·1 answer
  • Which are the correct commands to create and run an ReactJS project?
    10·1 answer
  • Fort Nite is the best u can’t say it’s not
    13·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!