Skip to main content
Tweeted twitter.com/#!/StackCodeGolf/status/599203217013141504
added 1 character in body
Source Link
user40734
user40734

The goal of this challenge is to receive an input and output that input but with sentence order reversed. Example Input:

Hello friend. What are you doing? I bet it is something I want to do too!

Example Output:

I bet it is something I want to do too! What are you doing? Hello friend.

As you can tell from the examples, your program has to deal with question marks, exclamation points, and periods. You can assume each sentence has a punctuation and than a space before the next sentence. Trailing spaces/newlines are ok, as long as it is readable. Shortest code wins.

Good luck!

EDIT: You can assume the sentences has no quotes or parentheses, but if you make your code be able to deal with both of those then you get -5 bytes Example output for parens/quotes:

"Hello, " she said. (I didn't know what she was talking about).) --> (I didn't know what she was talking about).) "Hello""Hello, " she said.

The goal of this challenge is to receive an input and output that input but with sentence order reversed. Example Input:

Hello friend. What are you doing? I bet it is something I want to do too!

Example Output:

I bet it is something I want to do too! What are you doing? Hello friend.

As you can tell from the examples, your program has to deal with question marks, exclamation points, and periods. You can assume each sentence has a punctuation and than a space before the next sentence. Trailing spaces/newlines are ok, as long as it is readable. Shortest code wins.

Good luck!

EDIT: You can assume the sentences has no quotes or parentheses, but if you make your code be able to deal with both of those then you get -5 bytes Example output for parens/quotes:

"Hello, " she said. (I didn't know what she was talking about). --> (I didn't know what she was talking about). "Hello", she said.

The goal of this challenge is to receive an input and output that input but with sentence order reversed. Example Input:

Hello friend. What are you doing? I bet it is something I want to do too!

Example Output:

I bet it is something I want to do too! What are you doing? Hello friend.

As you can tell from the examples, your program has to deal with question marks, exclamation points, and periods. You can assume each sentence has a punctuation and than a space before the next sentence. Trailing spaces/newlines are ok, as long as it is readable. Shortest code wins.

Good luck!

EDIT: You can assume the sentences has no quotes or parentheses, but if you make your code be able to deal with both of those then you get -5 bytes Example output for parens/quotes:

"Hello, " she said. (I didn't know what she was talking about.) --> (I didn't know what she was talking about.) "Hello, " she said.
added 1 character in body
Source Link
user40734
user40734

The goal of this challenge is to receive an input and output that input but with sentence order reversed. Example Input:

Hello friend. What are you doing? I bet it is something I want to do too!

Example Output:

I bet it is something I want to do too! What are you doing? Hello friend.

As you can tell from the examples, your program has to deal with question marks, exclamation points, and periods. You can assume each sentence has a punctuation and than a space before the next sentence. Trailing spaces/newlines are ok, as long as it is readable. Shortest code wins.

Good luck!

EDIT: You can assume the sentences has no quotes or parentheses, but if you make your code be able to deal with both of those then you get -5 bytes Example output for parens/quotes:

"Hello""Hello, " she said. (I didn't know what she was talking about). --> (I didn't know what she was talking about). "Hello", she said.

The goal of this challenge is to receive an input and output that input but with sentence order reversed. Example Input:

Hello friend. What are you doing? I bet it is something I want to do too!

Example Output:

I bet it is something I want to do too! What are you doing? Hello friend.

As you can tell from the examples, your program has to deal with question marks, exclamation points, and periods. You can assume each sentence has a punctuation and than a space before the next sentence. Trailing spaces/newlines are ok, as long as it is readable. Shortest code wins.

Good luck!

EDIT: You can assume the sentences has no quotes or parentheses, but if you make your code be able to deal with both of those then you get -5 bytes Example output for parens/quotes:

"Hello", she said. (I didn't know what she was talking about). --> (I didn't know what she was talking about). "Hello", she said.

The goal of this challenge is to receive an input and output that input but with sentence order reversed. Example Input:

Hello friend. What are you doing? I bet it is something I want to do too!

Example Output:

I bet it is something I want to do too! What are you doing? Hello friend.

As you can tell from the examples, your program has to deal with question marks, exclamation points, and periods. You can assume each sentence has a punctuation and than a space before the next sentence. Trailing spaces/newlines are ok, as long as it is readable. Shortest code wins.

Good luck!

EDIT: You can assume the sentences has no quotes or parentheses, but if you make your code be able to deal with both of those then you get -5 bytes Example output for parens/quotes:

"Hello, " she said. (I didn't know what she was talking about). --> (I didn't know what she was talking about). "Hello", she said.
added 171 characters in body
Source Link
user40734
user40734

The goal of this challenge is to receive an input and output that input but with sentence order reversed. Example Input:

Hello friend. What are you doing? I bet it is something I want to do too!

Example Output:

I bet it is something I want to do too! What are you doing? Hello friend.

As you can tell from the examples, your program has to deal with question marks, exclamation points, and periods. You can assume each sentence has a punctuation and than a space before the next sentence. Trailing spaces/newlines are ok, as long as it is readable. Shortest code wins.

Good luck!

EDIT: You can assume the sentences has no quotes or parentheses, but if you make your code be able to deal with both of those then you get -5 bytes Example output for parens/quotes:

"Hello", she said. (I didn't know what she was talking about). --> (I didn't know what she was talking about). "Hello", she said.

The goal of this challenge is to receive an input and output that input but with sentence order reversed. Example Input:

Hello friend. What are you doing? I bet it is something I want to do too!

Example Output:

I bet it is something I want to do too! What are you doing? Hello friend.

As you can tell from the examples, your program has to deal with question marks, exclamation points, and periods. You can assume each sentence has a punctuation and than a space before the next sentence. Trailing spaces/newlines are ok, as long as it is readable. Shortest code wins.

Good luck!

EDIT: You can assume the sentences has no quotes or parentheses, but if you make your code be able to deal with both of those then you get -5 bytes

The goal of this challenge is to receive an input and output that input but with sentence order reversed. Example Input:

Hello friend. What are you doing? I bet it is something I want to do too!

Example Output:

I bet it is something I want to do too! What are you doing? Hello friend.

As you can tell from the examples, your program has to deal with question marks, exclamation points, and periods. You can assume each sentence has a punctuation and than a space before the next sentence. Trailing spaces/newlines are ok, as long as it is readable. Shortest code wins.

Good luck!

EDIT: You can assume the sentences has no quotes or parentheses, but if you make your code be able to deal with both of those then you get -5 bytes Example output for parens/quotes:

"Hello", she said. (I didn't know what she was talking about). --> (I didn't know what she was talking about). "Hello", she said.
deleted 1 character in body
Source Link
user40734
user40734
Loading
added 159 characters in body
Source Link
user40734
user40734
Loading
Source Link
user40734
user40734
Loading