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
a_sh-v [17]
3 years ago
9

Write a program that reads a person's first and last names, separated by a space. Then the program outputs last name, comma, fir

st name. End with newline. Example output if the input is: Maya Jones
Computers and Technology
1 answer:
mart [117]3 years ago
6 0

In pyton:

name = input("What is your name? ")

lst = name.split()

print(f"{lst[-1]}, {lst[0]}")

I hope this helps!

You might be interested in
p25: File Write and Read1) User enters a file name (such as "myMovies.txt").2) User enters the titles of 4 of their favorite mov
SCORPION-xisa [38]

Answer:

<em>The program goes as follows  </em>

<em>Comments are used to explain difficult lines</em>

#include<iostream>

#include<fstream>

#include<sstream>

#include<string>

using namespace std;

int main()

{

//Declare String to accept file name

string nm;

//Prompt user for file name

cout<<"Enter File Name: ";

getline(cin,nm);

//Create File

ofstream Myfile(nm.c_str());

//Prompt user for 4 names of movies

string movie;

for(int i = 1;i<5;i++)

{

 cout<<"Please enter a movie title #"<<i<<": ";

 cin>>movie;

 //Write to file, the names of each movies

 Myfile<<movie<<endl;

}

Myfile.close(); // Close file

//Create an Array for four elements

string myArr[4];

//Prepare to read from file to array

ifstream file(nm.c_str());

//Open File

if(file.is_open())

{

 for(int i =0;i<4;i++)

 {

  //Read each line of the file to array (line by line)

  file>>myArr[i];

 }

}

file.close(); // Close file

//Create a reverseOrder.txt file

nm = "reverseOrder.txt";

//Prepare to read into file

ofstream Myfile2(nm.c_str());

for(int j = 3;j>=0;j--)

{

 //Read each line of the file to reverseOrder.txt (line by line)

 Myfile2<<myArr[j]<<endl;

}

Myfile2.close(); //Close File

return 0;

}

See attached for .cpp program file

Download cpp
6 0
3 years ago
Why did hockey champion Haley wickenheiser feel angry after the Bach said the IOC would make a decision in the next month?
aliina [53]

Haley wickenheiser felt angry after the Bach said the IOC would make a decision in the next month as the IOC says the games will be held no later than summer 2021 but they will still be called the 2020 Tokyo Olympics.

Explanation:

  • The Tokyo Olympics were postponed until 2021 on Tuesday, ending weeks of speculation that the games could not go ahead as scheduled because of the coronavirus pandemic.
  • The International Olympic Committee made the decision after speaking with Japanese Prime Minister Shinzo Abe and local organizers.
  • The IOC said the games will be held not later than summer 2021 but they will still be called the 2020 Tokyo Olympics.
  • “President Bach said he will agree ‘100%,’ and we agreed to hold the Tokyo Olympics and Paralympics in the summer of 2021 at the latest,” Abe said, saying holding the games next year would be “proof of a victory by human beings against the coronavirus infections.”
  • The decision came only a few hours after local organizers said the torch relay would start as planned on Thursday.
4 0
2 years ago
Can you withdraw from courses in top hat?
ad-work [718]

Answer:

Yes, but this must be done before the withdraw deadline

Explanation:

TopHat is an online learning platform. Students register for courses and if they decide not to continue with a course for reasons best known to them, they are allowed a time period usually one to two weeks to drop the courses. They are then reimbursed the fee for that particular course.

But if that time period elapses and they drop the course, that is considered a withdrawal that is not accepted and which no provisions for reimbursements are made.

7 0
2 years ago
Who is in the age range of 13-15 and wants to join a mine craft smp?
Ratling [72]

Answer: Wow that's really cool!

3 0
2 years ago
Learning is Fun
amm1812
Ggs mate rip pop smoke have a good day I’m just clowning around
3 0
2 years ago
Other questions:
  • A friend has a CD of one of your favorite artists and has offered to let you copy it.
    8·1 answer
  • In C, developers may access arrays via bracketed syntax like Java or by using * dereferencing notation. The following assignment
    5·1 answer
  • In which job role would a course in 3D modeling help with professional career prospects?
    9·2 answers
  • Debbie’s colleague hasn’t provided her the required details to complete an important report. She is upset by this, and she sends
    14·2 answers
  • What is ‘Software Testing’?
    13·1 answer
  • Which computer component are you most like? Explain why.
    10·1 answer
  • CSCU EXAM TEST FINAL1-A software or hardware that checks information coming from the Internet and depending on the applied confi
    6·1 answer
  • The computer stores currently used programs and data in ________.
    9·2 answers
  • When is not appropriate to be funny in a headline
    7·1 answer
  • Provide 3to 4 sentence overview of microsoft windows features?
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!