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
ANEK [815]
3 years ago
11

The function below takes a two parameters: a list called a_list and a value called a_value. Complete the function to first check

to see if the value is already in the list. If the value is already in the list, then do nothing. Otherwise, append the value to the end of the list. Your function doesn't need to return anything.
Engineering
1 answer:
Alik [6]3 years ago
5 0

Explanation:

def checklist(a_list, a_value):// def //used to name a function, the //arguments being passed into the //functions are a_list and a_value

if a_value in list://if statement to

//check if it's in the list or not

print("")//print statement to do

//nothing

else://else statement for if the

//a_value is in a_list

a_list.append(a_value)//this adds

//the value to the list

You might be interested in
A distribution center is used in which of the following applications?
FrozenT [24]

both b and c are the right

5 0
3 years ago
Electric heater wires are installed in a solid wall having a thickness of 8 cm and k=2.5 W/m.°C. The right face is exposed to an
Svet_ta [14]

Answer:

2.46 * 10⁵ W/m³

Explanation:

See attached pictures for detailed explanation.

6 0
4 years ago
Read 2 more answers
I'll mark brainliest plz help
Citrus2011 [14]

Answer:

Explanation:

There are three points in time we need to consider.  At point 0, the mango begins to fall from the tree.  At point 1, the mango reaches the top of the window.  At point 2, the mango reaches the bottom of the window.

We are given the following information:

y₁ = 3 m

y₂ = 3 m − 2.4 m = 0.6 m

t₂ − t₁ = 0.4 s

a = -9.8 m/s²

t₀ = 0 s

v₀ = 0 m/s

We need to find y₀.

Use a constant acceleration equation:

y = y₀ + v₀ t + ½ at²

Evaluated at point 1:

3 = y₀ + (0) t₁ + ½ (-9.8) t₁²

3 = y₀ − 4.9 t₁²

Evaluated at point 2:

0.6 = y₀ + (0) t₂ + ½ (-9.8) t₂²

0.6 = y₀ − 4.9 t₂²

Solve for y₀ in the first equation and substitute into the second:

y₀ = 3 + 4.9 t₁²

0.6 = (3 + 4.9 t₁²) − 4.9 t₂²

0 = 2.4 + 4.9 (t₁² − t₂²)

We know t₂ = t₁ + 0.4:

0 = 2.4 + 4.9 (t₁² − (t₁ + 0.4)²)

0 = 2.4 + 4.9 (t₁² − (t₁² + 0.8 t₁ + 0.16))

0 = 2.4 + 4.9 (t₁² − t₁² − 0.8 t₁ − 0.16)

0 = 2.4 + 4.9 (-0.8 t₁ − 0.16)

0 = 2.4 − 3.92 t₁ − 0.784

0 = 1.616 − 3.92 t₁

t₁ = 0.412

Now we can plug this into the original equation and find y₀:

3 = y₀ − 4.9 t₁²

3 = y₀ − 4.9 (0.412)²

3 = y₀ − 0.83

y₀ = 3.83

Rounded to two significant figures, the height of the tree is 3.8 meters.

7 0
3 years ago
What is the worlds fastest car
Aneli [31]

Answer:

Thrust SSC

Explanation:

You can look it up

3 0
3 years ago
Read 2 more answers
Q4 a.
dedylja [7]

The Java program that accepts a matrix of M × N order and then interchanges diagonals of the matrix is given below:

<h3>Steps:  </h3>
  • 1. We can only interchange diagonals for a square matrix.
  • 2. Therefore, we would have to create a square matrix of size [M × M].
  • 3. We would check whether the matrix is a square matrix or not. If the matrix is square then follow step 3 else terminate the program.
  • 4. Apply logic for interchange diagonal of the matrix some logic is given below.

<h3>Java Code</h3>

//  Java Program to Accept a Matrix of Order M x N &

//  Interchange the Diagonals

import java.util.Scanner;

public class InterchangeDiagonals {

   public static void main(String[] args)

   {

       // declare variable

       int m, n, i, j, temp;

       // create a object of scanner class

       Scanner sc = new Scanner(System.in);

       System.out.print("Enter number of rows ");

       // take number of rows

       m = sc.nextInt();

       System.out.print("Enter number of columns ");

       // take number of columns

       n = sc.nextInt();

       // declare a mxn order array

       int a[][] = new int[m][n];

       // if block it's execute when m is equals to n

       if (m == n) {

           System.out.println(

               "Enter all the values of matrix ");

           // take the matrix inputs

           for (i = 0; i < m; i++) {

               for (j = 0; j < n; j++) {

                   a[i][j] = sc.nextInt();

               }

           }

           System.out.println("original Matrix:");

           // print the original matrix

           for (i = 0; i < m; i++) {

               for (j = 0; j < n; j++) {

                   System.out.print(a[i][j] + " ");

               }

               System.out.println("");

           }

          // perform interchange

           for (j = 0; j < m; j++) {

               temp = a[j][j];

               a[j][j] = a[j][n - 1 - j];

               a[j][n - 1 - j] = temp;

           }

           System.out.println(

               " after interchanging diagonals of matrix ");

           // print interchanged matrix

           for (i = 0; i < m; i++) {

               for (j = 0; j < n; j++) {

                   System.out.print(a[i][j] + " ");

               }

               System.out.println("");

           }

       }

       // else block it's only execute when m is not equals

       // to n

       else {

           System.out.println("Rows not equal to columns");

       }

   }

}

Read more about java programming here:

brainly.com/question/18554491

#SPJ1

7 0
1 year ago
Other questions:
  • For the following conditions determine whether a CMFR or a PFR is more efficient in removing a reactive compound from the waste
    9·1 answer
  • A gasoline engine has a piston/cylinder with 0.1 kg air at 4 MPa, 1527◦C after combustion, and this is expanded in a polytropic
    14·1 answer
  • (a) Consider a germanium semiconductor at T 300 K. Calculate the thermal equilibrium electron and hole concentrations for (i) Nd
    7·1 answer
  • The Bureau of Labor and Statistics predicted that the field of biomedical engineering would increase by 62 percent over the comi
    5·1 answer
  • 12 times the square root of 8737
    13·1 answer
  • True or false It is legal to pass in Florida when approaching within 100 feet of or traversing any railroad crossing grade croea
    15·1 answer
  • When was solar power envold ​
    8·2 answers
  • 4. The instant the ignition switch is turned to the start position,
    13·1 answer
  • Find the rate of heat transfer through a 6 mm thick glass window with a cross-sectional area of 0.8 m2 if the inside temperature
    15·1 answer
  • Jack has been concerned about the rapidly changing green regulations in his state and his ability as a mechanical engineer to ke
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!