-
Notifications
You must be signed in to change notification settings - Fork 0
/
task.html
21 lines (21 loc) · 1.23 KB
/
task.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<b>Preprocessing</b> <a class=right href="https://hyperskill.org/learn/step/6849">Open on JetBrains Academy</a>
<br><br>
<html>
<head></head>
<body>
<p>Preprocess an input text:</p>
<ul>
<li>delete punctuation symbols (commas, periods, exclamation and question marks <code class="java">,.!?</code>),</li>
<li>convert all symbols to lowercase.</li>
</ul>
<p>Then print your text.</p>
<p>Punctuation marks appear not only at the end of the input string, so you have to figure out how to get rid of all of them.</p>
<p><button class="btn-sm btn-outline-secondary" onclick="getElementById('hint-360').style.display='inline'"> Hint </button> </p>
<div id="hint-360" style="display:none;">
You can use the following way to remove the punctuation marks:
<code class="java">str.replace("!", "")</code>. Replacing a symbol with an empty line is the same as removing it.
</div>
<p></p>
</body>
</html><br><b>Sample Input:</b><br>Nobody expects the Spanish inquisition!<br><b>Sample Output:</b><br>nobody expects the spanish inquisition<br><br><br><font color="gray">Memory limit: 256 MB</font><br><font color="gray">Time limit: 15 seconds</font><br><br>
<a href="https://hyperskill.org/learn/step/6842">Show topic summary</a>