-
Notifications
You must be signed in to change notification settings - Fork 0
/
task.html
19 lines (19 loc) · 1.25 KB
/
task.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<h2>I have friends</h2>
<html>
<head></head>
<body>
<p>Below you can see the class <code class="java">User</code>.</p>
<p>This class has two methods: <code class="java">__init__</code> and <code class="java">add_friends</code>.</p>
<p>The <code class="java">__init__</code> method does what any <code class="java">__init__</code> does, while <code class="java">add_friends</code> increases the number of friends that the user has by the value of <strong>n</strong>. However, the <code class="java">add_friends</code> method has been defined somewhat incorrectly and right now it doesn't do what it's supposed to do.</p>
<p>Your task is to fix the mistakes in the method.</p>
<p><button class="btn-sm btn-outline-secondary" onclick="getElementById('hint-539').style.display='inline'"> Hint </button> </p>
<div id="hint-539" style="display:none;">
Pay attention to self.
</div>
<p></p>
</body>
</html><br><br><font color="gray">Memory limit: 256 MB</font><br><font color="gray">Time limit: 15 seconds</font><br><br>
<b>Caution</b><br><br>
You may see errors in your code or execution results due to missing context. Don’t worry about it, just write the solution and press Check.
<br><br>
<a href="https://hyperskill.org/learn/step/6981">Show topic summary</a>