-
Notifications
You must be signed in to change notification settings - Fork 0
/
task.html
20 lines (20 loc) · 1.38 KB
/
task.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<b>CapWords</b> <a class=right href="https://hyperskill.org/learn/step/9464">Open on JetBrains Academy</a>
<br><br>
<html>
<head></head>
<body>
<p>In Python, the names of classes follow the <samp>CapWords</samp> convention. Let's convert the input phrase accordingly by capitalizing all words and spelling them without underscores in-between.</p>
<p><strong>The input format:</strong></p>
<p>A word or phrase, with words separated by underscores, like function and variable names in Python.</p>
<p>You might want to change the case of letters since they are not necessarily lowercased.</p>
<p><strong>The output format:</strong></p>
<p>The name written in the <samp>CapWords</samp> fashion.</p>
<p><button class="btn-sm btn-outline-secondary" onclick="getElementById('hint-606').style.display='inline'"> Hint </button> </p>
<div id="hint-606" style="display:none;">
Make use of
<code class="java">word.capitalize()</code> to switch the first letter of a word to uppercase and the rest of the letters to lowercase.
</div>
<p></p>
</body>
</html><br><b>Sample Input:</b><br>BIRD<br><b>Sample Output:</b><br>Bird<br><br><b>Sample Input:</b><br>my_class<br><b>Sample Output:</b><br>MyClass<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/6972">Show topic summary</a>