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
Darina [25.2K]
3 years ago
10

Write a program that reads a person's first and last names separated by a space, assuming the first and last names are both sing

le words. Then the program outputs last name, comma, first name. End with newline. Example output if the input is: Maya Jones Jones, Maya
Computers and Technology
1 answer:
Over [174]3 years ago
3 0

Answer:

Written in Python:

import re

name = input("Name: ")

print(re.sub("[ ]", ", ", name))

Explanation:

This line imports the regular expression library

import re

This line prompts user for input

name = input("Name: ")

This line replace the space with comma and prints the output

print(re.sub("[ ]", ", ", name))

You might be interested in
Give 3 reasons why it is believed that smart phones precent us from communicating face to face.give three reasons why it is beli
gregori [183]

Answer:

yes

Explanation:

because the people will be lazy to go and talk to that person instead They will call each other and discuss

7 0
2 years ago
A string is represented as an array of characters. If you need to store an array of 5 strings with the maximum length of a strin
erastova [34]

Answer:

char str[5][100]

Explanation:

See attachment for options:

From the options, we can see that the programming language is C language.

The syntax to store an array of m strings with a maximum of n elements in C is:

char array-name[m][n]

In this case:

m = 5 --- Number of strings in the array

n = 100 --- Maximum character in each string

Assume the array name is str, the syntax can be expressed as:

char str[5][100]

3 0
3 years ago
According to the SANS Institute, a __________ is typically a document that outlines specific requirements or rules that must be
nata0808 [166]
That’s should be in the quizlet I think..
7 0
3 years ago
A class car and its subclass bmw each have a method run(), which was written by the developer as part of the class definition. i
krok68 [10]

The answer is : the run() method defined in BMW will be called.

run() BMW

5 0
4 years ago
The ____ is the ranking executive on-site when the crisis or emergency arises, who is authorized to initiate the CM plan.
aleksklad [387]

The answer is the Executive-in charge

The concept of an Executive-in charge came from the military’s chain of command. A chain of command ranges from a supervisor to the top executive of the organization. When a crisis arises, it is possible that one or more of the senior top managers may not be available for consultations because of the travel-intensive positions.






7 0
3 years ago
Read 2 more answers
Other questions:
  • How can you best utilize CSS for Web Development?
    6·1 answer
  • What kind of device is a printer? output or input
    13·1 answer
  • The producer thread will alternate between sleeping for a random period of time and inserting a random integer into the buffer.
    7·1 answer
  • In codd's model of a relational database, data is stored in a(n) _____, which maintains information about a(
    7·1 answer
  • How do you change the text style on brainly mobile ?
    12·1 answer
  • Interest assessments are always accurate. True False
    5·1 answer
  • When including multiple images in a report, it may help to create a _____ on each image so you can cross reference them througho
    11·1 answer
  • Best way to build a model bridge
    5·2 answers
  • Type the correct answer in each box. Spell all words correctly.
    14·2 answers
  • What is the full form of RPM in computer ​
    10·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!