Kind of stuck on starting a problem..
Here is the question:
Quote:
Write a program that will read a line of text as input and then display the line with the first word moved to the end of the line. For example, a possible
sample interaction with the user might be
Enter a line of text. No punctuation please. Java is the language I have rephrased that line to read: Is the language Java
Assume that there is no space before the first word and that the end of the first word is indicated by a blank, not by a comma or other punctuation. Note that the new first word must begin with a capital letter.
From looking at the question i'm guessing that I need to somehow get my program to recognize what the first word in the inputted sentence is. How exactly would I do this? I'm guessing it has something to do with stopping when the program reads an empty space like " " but i'm not sure how to do this.
Perhaps finding the length of the first word and than printing all of the characters of the first word after the entered sentence? But than I don't know how to get rid of the first word from the start of the sentence :confused:
All I really need is to know how to split and recognize words in a sentence. I know there was a split feature in python that recognizes words because of blank spaces in between them: " "