does this long sentence need to be split into 2 to make things more clear?

the question is derived from that post

here is a long sentence to describe a question on that post.

this piece of code used to demonstrate algorithm complexity and
Measuring the Run Time of an Algorithm comes from a book
FUNDAMENTALS OF PYTHON: FROM FIRST PROGRAMS THROUGH DATA STRUCTURES

does this long sentence need to be split into following 2 to make things more clear?

this piece of code used to demonstrate algorithm complexity and Measuring the Run Time of an Algorithm.

this piece of code comes from a book FUNDAMENTALS OF PYTHON: FROM FIRST PROGRAMS THROUGH DATA STRUCTURES.

this one looks better?

the book FUNDAMENTALS OF PYTHON: FROM FIRST PROGRAMS THROUGH DATA STRUCTURES inspires me the following piece of code

...code snippet

which can be used to demonstrate algorithm complexity and Measuring the Run Time of an Algorithm

Answer

No, it doesn’t need to be split, but you definitely have to correct the grammar to clarify what you want to say. I have no idea why you’ve highlighted “measuring the run time of an algorithm” since this is a description, not a title.

Instead, I would just list (as a parallel structure) the two things the code does:

This code snippet can be used to demonstrate algorithm complexity and measure algorithm run time.

To connect it to the second part (the source inspiration), use a non-restrictive clause:

This code snippet, which can be used to demonstrate algorithm complexity and measure algorithm run time, was inspired by the book “FUNDAMENTALS OF PYTHON: FROM FIRST PROGRAMS THROUGH DATA STRUCTURES”.

Or the other way around:

This code snippet, which was inspired by the book “FUNDAMENTALS OF PYTHON: FROM FIRST PROGRAMS THROUGH DATA STRUCTURES”, can be used to demonstrate algorithm complexity and measure algorithm run time.

Or even a simple conjunction:

This code snippet was inspired by the book “FUNDAMENTALS OF PYTHON: FROM FIRST PROGRAMS THROUGH DATA STRUCTURES”, and can be used to demonstrate algorithm complexity and measure algorithm run time.

Of course there are dozens of other ways to phrase this sentence, but hopefully one of these should serve.

Attribution
Source : Link , Question Author : Community , Answer Author : Andrew

Leave a Comment