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
Identify the characteristics of syntax errors. Choose all that apply.
kodGreya [7K]

Answer:

Explanation:

Identify the characteristics of syntax errors. Choose all that apply.

programmer did not follow the program language conventions

may be highlighted while writing the program

can be caused by mistyping or misspelling while writing the program

8 0
3 years ago
Read 2 more answers
Can someone start me off with a short 2 or 3 paragraphs about the pros and cons of Microsoft Word, and if you can recommend a si
Romashka-Z-Leto [24]
Microsoft Word is an overall very good application. It can be easily used with other Microsoft products, such as PowerPoint and Excel. However, there are some cons.

The spelling and grammar check is widely considered not very good. It does pick up many spelling errors, but many grammar errors are either not noticed, or are incorrectly noticed - it may say that you have made an error when you have not.
7 0
3 years ago
Advertising managers work on websites used in __________?
Elena-2011 [213]
Campaigns

Hope this is right :-;
3 0
3 years ago
Read 2 more answers
Signed ints versus unsigned ints:
julia-pushkina [17]
The answer is c !!!!!!!!!
7 0
4 years ago
In what ways do cameras allow us to see the world in ways that we could not with only our eyes?
Grace [21]
Cams always us to see things that happen when we are not there
6 0
3 years ago
Read 2 more answers
Other questions:
  • When a chart is inserted into a Word document, it displays
    15·2 answers
  • Which of the following is NOT true about placement of the keyboard?
    6·1 answer
  • What is "social
    13·2 answers
  • For any element in keysList with a value smaller than 40, print the corresponding value in itemsList, followed by a space.
    6·1 answer
  • If you receive an email message you suspect is spam, what should you do?
    11·1 answer
  • Join my disc server "the angels"<br><br> https://dis cord.gg/PYnWArCz<br><br><br> tyyy
    5·1 answer
  • MORE FREEE POINTS AYEEE
    7·2 answers
  • State differences between title bar and menu bar​
    5·1 answer
  • Explain what the loop does and what the result of executing it will be.
    7·1 answer
  • Which trait can be a positive or negative?
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!