answer.
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
Illusion [34]
2 years ago
12

Many documents use a specific format for a person's name. Write a program whose input is: firstName middleName lastName and whos

e output is: lastName, firstInitial.middleInitial. Ex: If the input is: Pat Silly Doe the output is: Doe, P.S. If the input has the form: firstName lastName the output is______________.
Computers and Technology
1 answer:
goblinko [34]2 years ago
6 0

Answer:

The solution code is written in Python:

  1. name = input("Enter your name: ")
  2. name_components = name.split(" ")
  3. first_name = name_components[0]
  4. middle_name = name_components[1]
  5. last_name = name_components[2]
  6. print(last_name + ", " + first_name[0] + "." + middle_name[0])

Explanation:

Firstly, prompt user to enter name (Line 1).

Next, use the string <em>split()</em> method and use space " " as separator to split the input string into individual component, first name, middle name, last name and assign to variable <em>first_name, middle_name </em>and<em> last_name </em>(Line 5-7).

Display the output as required by the question.

You might be interested in
There is a file "IT4983" in my home (personal) directory. I don’t know my current working directory. How can I find out the file
RoseWind [281]

Answer and Explanation:

Find / -name "IT4983"

See what it will do is it will find the file named IT4983 in the root directory.

run this commmand with sudo just in case for permission issues.

then it will give you the location of that file we want to find.

 

Or

$ file /home/IT4983 ( you can type this command from whichever directory you are )

output : IT4983 , ASCII TEXT

3 0
2 years ago
A city government is attempting to reduce the digital divide between groups with differing access to computing and the Internet.
sergeinik [125]

Answer:

C

Explanation:

Putting all government forms on the city web site is the least activity likely to be effective in the purpose of reducing digital divide.

Holding basic computer classes at the community centers will very much help to reduce the digital divide.

Providing free wireless internet connections at locations in low-income neighborhood will also reduce the gap of digital divide

Requiring that every city school has computers that meet a minimum hardware and software will made computing resources available to users thereby reducing digital divide.

5 0
1 year ago
Write a class named Employee that has private data members for an employee's name, ID_number, salary, and email_address. It shou
mario62 [17]

Solution :

class Employee:

   #Define the

   #constructor.

   def __$\text{init}$__($\text{self, nam}e$,  ID_number, $\text{salary}$, email):

       #Set the values of

       #the data members of the class.

       $\text{self.nam}e$ = name

       $\text{self.ID}$_number = ID_number

       $\text{self.salary}$ = salary

       self.email_address = email

#Define the function

#make_employee_dict().

def make_employee_dict(list_names, list_ID, list_salary, list_email):

   #Define the dictionary

   #to store the results.

   employee_dict = {}

   #Store the length

   #of the list.

   list_len = len(list_ID)

   #Run the loop to

   #traverse the list.

   for i in range(list_len):

       #Access the lists to

       #get the required details.

       name = list_names[i]

       id_num = list_ID[i]

       salary = list_salary[i]

       email = list_email[i]

       #Define the employee

       #object and store

       #it in the dictionary.

       employee_dict[id_num] = Employee(name, id_num, salary, email)

   #Return the

   #resultant dictionary.

   return employee_dict

6 0
1 year ago
To explain acceptable computer use to their employees, students, or other users, many organizations and educational institutions
docker41 [41]

Answer:

Codes of conduct

Explanation:

Codes of conduct are a set of rules or norms established by an organization for all employees, students or users, to ensure individual responsibilities and proper practices. The code of conduct can cover overall behaviour of individuals in an organization, but a specific code of conduct can be developed for proper computer use in order to establish what is appropriate and available to use in the organization´s computers, and also to restrict or avoid non related content.

7 0
1 year ago
Read 2 more answers
Adrian has decided to create a website to catalog all the books he has in his personal library. He wants to store this informati
Lostsunrise [7]
I think it is XML. Hope that helps.
8 0
2 years ago
Read 2 more answers
Other questions:
  • A search box does all of the following EXCEPT ________.
    12·2 answers
  • Suppose the algorithms used to implement the operations at layer k is changed. how does this impact services at layers k-1 and k
    10·1 answer
  • Ajay wants to read a brief overview about early settlers in the United States. Which type of online text source should he most l
    9·2 answers
  • If you have long column labels with columns so wide that they affect the readability of a worksheet, you should first
    7·1 answer
  • Define a function PyramidVolume with double parameters baseLength, baseWidth, and pyramidHeight, that returns as a double the vo
    7·2 answers
  • You realize your computer has been infected with malware. It seems as if someone is controlling your computer from a remote loca
    5·1 answer
  • Sara is having a tough time finding the cause of a problem on a computer she is troubleshooting. She found a possible problem bu
    15·1 answer
  • Recall the problem of finding the number of inversions. As in the text, we are given a sequence of n numbers a1, . . . , an, whi
    8·1 answer
  • (Package Inheritance Hierarchy) Package-delivery services, such as FedEx®, DHL® and UPS®, offer a number of different shipping o
    10·1 answer
  • #Write a function called fancy_find. fancy_find should have #two parameters: search_within and search_for. # #fancy_find should
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!