Fix curly quotes

pull/36326/head
Kris Koishigawa 2019-05-22 23:41:41 +09:00 committed by mrugesh
parent a6ed1e51b7
commit 0544554b00
5 changed files with 13 additions and 13 deletions

View File

@ -8,13 +8,13 @@ challengeType: 5
<section id='description'>
This task is a variation of the <a href='https://en.wikipedia.org/wiki/The Nine Billion Names of God#Plot_summary' title='wp: The Nine Billion Names of God#Plot_summary' target='_blank'>short story by Arthur C. Clarke</a>.
(Solvers should be aware of the consequences of completing this task.)
In detail, to specify what is meant by a “name”:
In detail, to specify what is meant by a "name":
<ul>
<li>The integer 1 has 1 name “1”.</li>
<li>The integer 2 has 2 names “1+1” and “2”.</li>
<li>The integer 3 has 3 names “1+1+1”, “2+1”, and “3”.</li>
<li>The integer 4 has 5 names “1+1+1+1”, “2+1+1”, “2+2”, “3+1”, “4”.</li>
<li>The integer 5 has 7 names “1+1+1+1+1”, “2+1+1+1”, “2+2+1”, “3+1+1”, “3+2”, “4+1”, “5”.</li>
<li>The integer 1 has 1 name "1".</li>
<li>The integer 2 has 2 names "1+1" and "2".</li>
<li>The integer 3 has 3 names "1+1+1", "2+1", and "3".</li>
<li>The integer 4 has 5 names "1+1+1+1", "2+1+1", "2+2", "3+1", "4".</li>
<li>The integer 5 has 7 names "1+1+1+1+1", "2+1+1+1", "2+2+1", "3+1+1", "3+2", "4+1", "5".</li>
</ul>
This can be visualized in the following form:
<pre>

View File

@ -7,7 +7,7 @@ challengeType: 5
## Description
<section id='description'>
A generator is an executable entity (like a function or procedure) that contains code that yields a sequence of values, one at a time, so that each time you call the generator, the next value in the sequence is provided.
Generators are often built on top of coroutines or objects so that the internal state of the object is handled “naturally”.
Generators are often built on top of coroutines or objects so that the internal state of the object is handled "naturally".
Generators are often used in situations where a sequence is potentially infinite, and where it is possible to construct the next value of the sequence with only minimal state.
</section>

View File

@ -14,10 +14,10 @@ challengeType: 5
Write a simple reader/parser for S-Expressions that handles quoted and unquoted strings, integers and floats.
The function should read a single but nested S-Expression from a string and return it as a (nested) array.
Newlines and other whitespace may be ignored unless contained within a quoted string.
<tt>()</tt> inside quoted strings are not interpreted, but treated as part of the string.
Handling escaped quotes inside a string is optional; thus <tt>(foo"bar)</tt>” maybe treated as a string “<tt>foo"bar</tt>, or as an error.
For this, the reader need not recognize <tt>\</tt>” for escaping, but should, in addition, recognize numbers if the language has appropriate datatypes.
Note that with the exception of <tt>()"</tt>” (“<tt>\</tt>” if escaping is supported) and whitespace there are no special characters. Anything else is allowed without quotes.
"<tt>()</tt>" inside quoted strings are not interpreted, but treated as part of the string.
Handling escaped quotes inside a string is optional; thus "<tt>(foo"bar)</tt>" maybe treated as a string "<tt>foo"bar</tt>", or as an error.
For this, the reader need not recognize "<tt>\</tt>" for escaping, but should, in addition, recognize numbers if the language has appropriate datatypes.
Note that with the exception of "<tt>()"</tt>" ("<tt>\</tt>" if escaping is supported) and whitespace there are no special characters. Anything else is allowed without quotes.
The reader should be able to read the following input
<pre>
((data "quoted data" 123 4.5)

View File

@ -14,7 +14,7 @@ US New York
US Birmingham
UK Birmingham
</pre>
Similarly, stable sorting on just the first column would generate “UK London” as the first item and “US Birmingham” as the last item (since the order of the elements having the same first word “UK” or “US” would be maintained).
Similarly, stable sorting on just the first column would generate "UK London" as the first item and "US Birmingham" as the last item (since the order of the elements having the same first word "UK" or "US" would be maintained).
</section>
## Instructions

View File

@ -6,7 +6,7 @@ challengeType: 5
## Description
<section id='description'>
The <a href="https://en.wikipedia.org/wiki/Sutherland-Hodgman clipping algorithm" target="_blank">Sutherland-Hodgman clipping algorithm</a> finds the polygon that is the intersection between an arbitrary polygon (the “subject polygon”) and a convex polygon (the “clip polygon”).
The <a href="https://en.wikipedia.org/wiki/Sutherland-Hodgman clipping algorithm" target="_blank">Sutherland-Hodgman clipping algorithm</a> finds the polygon that is the intersection between an arbitrary polygon (the "subject polygon") and a convex polygon (the "clip polygon").
It is used in computer graphics (especially 2D graphics) to reduce the complexity of a scene being displayed by eliminating parts of a polygon that do not need to be displayed.
Take the closed polygon defined by the points:
<pre>[(50, 150), (200, 50), (350, 150), (350, 300), (250, 300), (200, 250), (150, 350), (100, 250), (100, 200)]</pre>