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
Archy [21]
4 years ago
12

Write a function get_initials(the name) that takes a string of a name and returns the initials of the name, in upper case, separ

ated by periods, with an additional period at the end. Input-Output Samples John Q Public J.Q.P. Homer J Simpson H.J.S. Gloria kind of a big deal Tropalogos G.O.O.D. If the argument to the function is the string on the left, then return the string on the right. You don't need to print, since that's the job of wherever the value is returned.
Computers and Technology
1 answer:
spayn [35]4 years ago
3 0

Answer:

Following are the code to this question:

def get_initials(the_name): #defining a method get_initials

   name = the_name.split(" ") #defining name variable that splits value

   val = ''#defining a string variable val  

   for n in name:  #defining loop to convert value into upper case and store first character

       val = val + n[0].upper() + "."  # use val variable to hold value

   return val # return val

print(get_initials("Gloria kind of a big deal Tropalogos"))#call method and print return value

print(get_initials("Homer J Simpson"))#call method and print return value

print(get_initials("John Q Public")) #call method and print return value

Output:

J.Q.P.

H.J.S.

G.K.O.A.B.D.T.

Explanation:

In the given code, the last is incorrect because if we pass the value that is "Gloria kind of a big deal Tropalogos" so, will not give G.O.O.D. instead of that it will return G.K.O.A.B.D.T.  So, the program description can be given as follows:

  • In the given python code, a method "get_initials" is declared, that accepts "the_name" variable as a parameter, inside the method "name" variable is declared, which uses the split method that splits all values.
  • In the next step, a string variable "val"  and for loop is used, in which the "val" variable converts the first character of the string into the upper case and stores its character with "." symbol in "val" variable and return its value.
  • In the last step, the print method is used, that passes the string value and prints its sort value.
You might be interested in
PHOTOGRAPHY
Natasha_Volkova [10]

Answer:

false

Explanation:

when you zoom in it mkes it bigger and closer not smaller and farther

hope this helps :)

8 0
3 years ago
Read 2 more answers
Plz help
vazorg [7]

The correct answer is:


a. All parts of the circuit will begin to carry higher amounts of current than normal.


Explanation:


When two or more than two conductors of different phases touch each other in a power line, the part of the impedance is shunted out of the circuit due to which a large current flow in the un-faulted phases, such current is called the short circuit current. Short circuit current decreases the impedance in the circuit while the current in the circuit increases.

8 0
3 years ago
Read 2 more answers
To change the design of a query, right-click the query in the Navigation Pane and then click ____ on the shortcut menu.
Rama09 [41]
TO change the design of a query, right click the query in the Navigation Panel and the click "Design View" on the shortcut Menu. Design view tab is where you can make changes on your current design for your presentation,
7 0
3 years ago
Write a program that checks whether a positive number given by an input from the user is greater than 5 and less than 20 with ja
Alona [7]

Answer:

Program written in Java is as follows

See comments for explanations

import java.util.Scanner;

public class CheckRange {

public static void main (String [] args)

{

// This line allows the program accept user input

Scanner input = new Scanner(System.in);

//This line declares variable for user input

int num;

//This line prompts user for input

System.out.print("Number: ");

//This line gets user input

num = input.nextInt();

/* The following if statement checks if the user input is greater than 5 and less than 20 */

if (num > 5 && num <= 20)

{

/* This line is executed if the above condition is true */

System.out.print(num+" is greater than 5 and less than 20");

}

else

{

/*If the condition is not true, this line is executed*/

System.out.print(num+" is not within specified range");

}

// The if condition ends here

}

}

5 0
4 years ago
Can you please help me? I give you a brainlest <br>! ​
nlexa [21]
1.
2.satin stitch
3.lazy daisy stitch (detached chain )
4.chain stitch
5. cross stitch
6. french knot
7.
8.split stitch
9.
10. back stitch
the others i can’t tell.
4 0
3 years ago
Other questions:
  • Technician A says copper has a low resistance. Technician B says the length of wire doesn't affect resistance. Who is correct?
    11·1 answer
  • While traveling in India, Sabina notes all of her daily expenses in rupees in her spreadsheet. At the end of the day, she wants
    8·1 answer
  • Which of the following is an example of fine art? 1. fashion 2. interior design 3. painting 4. product design
    7·2 answers
  • What social media category allows users to publish content as posts but restricts the size of the post to a certain numbers of c
    8·1 answer
  • Each professional association has
    7·1 answer
  • Who are the people responsible for maintaining and controlling computer networks within an organization?
    10·1 answer
  • Choose the correct term to complete the sentence.
    11·1 answer
  • Write code that will copy the contents of the file into an array. You can assume that the file will only have 5 data values
    11·1 answer
  • Cookie Snooping
    14·1 answer
  • A project manager has designed a new secure data center and has decided to use multifactor locks on each door to prevent unautho
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!