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
What are 6 steps to take to figure out what's wrong with your computer?
lisabon 2012 [21]

Answer

  1. located the problem
  2. Go to system settings
  3. Try to uninstall and install the program
  4. Try troubleshooting the program
  5. Try contacting the device admin
  6. Read the user Manuel before try to do anything on the system
6 0
3 years ago
In a batch operating system, three jobs are submitted for execution. Each job involves an I/O activity, CPU time and another I/O
Ilia_Sergeevich [38]

Answer:

a) CPU utilization for uniprogramming system = 18.2%

b) CPU utilization for multiprogramming system = 41.379%

Explanation:

IO time = total time – CPU time

For JOB 1  

CPU time = 3ms ,

total time= 23ms

IO time = 23-3 = 20ms ,

For JOB 2

CPU time =5ms

total = 29ms

IO time = 29-5 = 24ms  

For JOB 3  

CPU time = 4ms

total = 14ms

IO time = 14-10 =10ms  

1.) In uniprogramming system, operations are performed sequentially

CPU utilization=total CPU time / total real time

CPU utilization =(3+5+4) / (23+29+14)

CPU utilization =0.182 or 18.2%

2) In multiprogramming system, jobs wait for the CPU to get free while performing IO operations concurrently

steps followed by the os

1. IO for 1st job                           at 0ms

2. IO for 2nd job                          at 0ms

3. IO for 3rd job                          at 0ms

4. CPU time for 3rd job              at 5ms

5. Next IO job for 3rd job           at 9ms END at 14ms

6. CPU time for 1st job              at 9ms

7. Next IO job for 1st job           at 14ms END at 23ms

8. CPU time for 2nd job             at 14ms

9. Next IO job for 2nd job          at 15ms END at 29ms

CPU time is 3+5+4 =12ms

Total execution time = 29ms

CPU utilization = 12*100/29= 41.379%

5 0
3 years ago
The following code will create a zombie child process because the child process is terminated and the parent process is busy in
Georgia [21]

Answer:

what on earth

Explanation:

5 0
3 years ago
The IT infrastructure components should be evaluated based on their expected financial value. All of the following are used to q
vladimir2022 [97]

Answer:(A) usability

Explanation:

The term usability refers to the usage value of products, how much they can be used and their value after their use. So adding on these points usability helps to quantify the financial value of IT components.

5 0
3 years ago
How to deactivate the brainly app?​
galina1969 [7]

Answer:

Don't you just uninstall it?

Explanation:

5 0
2 years ago
Read 2 more answers
Other questions:
  • A circuit has a resistance of 300 ohm and a current of 0.024 A. What is the voltage in the circuit?
    12·1 answer
  • What do you have to do to see the html code on a website?
    15·2 answers
  • What are the 4-bit patterns used to represent each of the characters in the string "1301"? Only represent the characters between
    14·1 answer
  • ____ is high-quality encryption software that has become quite popular for creating secure e-mail messages and encrypting other
    9·1 answer
  • A user makes a request to implement a patch management service for a company. As part of the requisition the user needs to provi
    7·1 answer
  • Suppose that your application uses a loop that isn't producing the intended results. The best way to analyze what’s going on in
    13·1 answer
  • Consider the following definition of the recursive function mystery. int mystery(int first, int last) { if (first > last) ret
    12·1 answer
  • Customizing ads to people who had earlier visited the site is
    14·1 answer
  • If the three operations were combined, O(logN) + O(N) * O(logN) + 1, the overall algorithm cost would be:________
    6·1 answer
  • You are writing a program using the Java language. Which of the following is a requirement of Java syntax?
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!