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
oee [108]
3 years ago
10

Suppose your name was Alan Turing. Write a statement that would print your last name, followed by a comma, followed by a space a

nd your first name.
Computers and Technology
1 answer:
vekshin13 years ago
5 0

Answer:

def name_string( name ):

     user_name = name

     split_name = user_name.split(" ")

     list( split_name )

    print ( split_name[ 1 ], ", ", split_name[ 0 ] )

# the test should print out " Turing, Alan"

name_string ( " Alan Turing " )  

Explanation:

The python function above should print out the reverse of a name and surname and separated by a comma.

You might be interested in
Write a program that reads a list of integers, and outputs whether the list contains all even numbers, odd numbers, or neither.
astraxan [27]

Answer:

uuuuu

Explanation:

8 0
2 years ago
Read 2 more answers
Viết chương trình hoàn chỉnh các yêu cầu sau:
Blababa [14]

Explanation:

the perimeter of an aluminium sheet is 120 CM if its length is reduced by 10% and its breadth is increased by 20% the perimeter does not change find the measure of the length and the breadth of the sheet

4 0
3 years ago
How does limiting a company's scope benefit the company? A. It encourages the company to use division of labor. B. It makes it e
Luda [366]

Answer

It makes it easier to produce a high quality product.

Explanation

Project scope is the part of project planning that involves determining and documenting a list of specific project goals, deliverable, tasks, costs and deadlines. in Project management it  involves the planning and organization of a company's resources to complete a specific task, event, or action and is usually a one-time event. It is an activity that is engaged in for the primary purpose of making a profit. These activities includes things like  production, operations, marketing, and administration

6 0
3 years ago
Read 2 more answers
What ip class is this address: 128-191.255.255.255?
defon
Class B would be the correct answer.
4 0
3 years ago
The return value is a one-dimensional array that contains two elements. These two elements indicate the rows and column indices
erma4kov [3.2K]

Answer:

In Java:

import java.util.Scanner;  

import java.util.Arrays;  

public class Main  {  

public static void main(String args[])  {  

Scanner input = new Scanner(System.in);

int row, col;  

System.out.print("Rows: ");    row = input.nextInt();

System.out.print("Cols: ");     col = input.nextInt();  

int[][] Array2D = new int[row][col];

System.out.print("Enter array elements: ");

for(int i =0;i<row;i++){    

    for(int j =0;j<col;j++){

        Array2D[i][j] = input.nextInt();  

    }     }

 

int[] maxarray = findmax(Array2D,row,col);

System.out.println("Row: "+(maxarray[0]+1));

System.out.println("Column: "+(maxarray[1]+1));

}  

public static int[] findmax(int[][] Array2D,int row, int col)   {  

int max = Array2D[0][0];

int []maxitem = new int [2];

for(int i =0;i<row;i++){

    for(int j =0;j<col;j++){

        if(Array2D[i][j] > max){  

            maxitem[0] = i;

            maxitem[1] = j; } }    }

 

return maxitem;  

}  

}

Explanation:

The next two lines import the scanner and array libraries

<em>import java.util.Scanner;   </em>

<em>import java.util.Arrays;   </em>

The class of the program

<em>public class Main  {  </em>

The main method begins here

<em>public static void main(String args[])  {  </em>

The scanner function is called in the program

<em>Scanner input = new Scanner(System.in);</em>

This declares the array row and column

int row, col;

This next instructions prompt the user for rows and get the row input  

System.out.print("Rows: ");    row = input.nextInt();

This next instructions prompt the user for columns and get the column input  

System.out.print("Cols: ");     col = input.nextInt();  

This declares the 2D array

int[][] Array2D = new int[row][col];

This prompts the user for array elements

System.out.print("Enter array elements: ");

The following iteration populates the 2D array

<em> for(int i =0;i<row;i++){    </em>

<em>     for(int j =0;j<col;j++){ </em>

<em>         Array2D[i][j] = input.nextInt();   </em>

<em>     }     } </em>

This calls the findmax function. The returned array of the function is saved in maxarray  

int[] maxarray = findmax(Array2D,row,col);

This prints the row position

System.out.println("Row: "+(maxarray[0]+1));

This prints the column position

System.out.println("Column: "+(maxarray[1]+1));

The main method ends here

}  

The findmax function begins here

public static int[] findmax(int[][] Array2D,int row, int col)   {  

This initializes the maximum to the first element of the array

int max = Array2D[0][0];

This declares maxitem. The array gets the position of the maximum element

int []maxitem = new int [2];

The following iteration gets the position of the maximum element

<em>for(int i =0;i<row;i++){ </em>

<em>     for(int j =0;j<col;j++){ </em>

<em>         if(Array2D[i][j] > max){  </em>

<em>             maxitem[0] = i; </em><em>-- The row position is saved in index 0</em><em> </em>

<em>             maxitem[1] = j;  </em><em>-- The column position is saved in index 1</em><em>} }    } </em>

This returns the 1 d array

return maxitem;  

}  

7 0
3 years ago
Other questions:
  • In Outlook 2016, what are the three format options when sending an email message? Check all that apply.
    7·1 answer
  • Which of the following is NOT a fixed expense?
    6·1 answer
  • All of the following are ways to limit what is tracked about you online, except:
    12·1 answer
  • Is downloading like installing?
    13·1 answer
  • Which of the following information should be included in audit documentation? a. Procedures performed. b. Audit evidence examine
    13·1 answer
  • A _________ is a task at the lowest level of the WBS that represents the level of work that the project manager uses to monitor
    5·1 answer
  • Power delivered to the hitch of tractors is called
    12·1 answer
  • Choose the parts of the browser window. PLEASE ANSWER QUICKLY TEST
    12·2 answers
  • Aubrey uses the following formula to calculate a required value. Which elements of the formula use mixed cell referencing?
    13·2 answers
  • The sdlc phase in which functional data specifications and processing rules are created is the ______________ phase.
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!