-
Notifications
You must be signed in to change notification settings - Fork 0
/
task.html
27 lines (27 loc) · 1.47 KB
/
task.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<h2>Patients</h2>
<html>
<head></head>
<body>
<p>The class <code class="java">Patient</code> needs both an unambiguous representation for developers and a readable string for users. Here's how they are supposed to look:</p>
<ul>
<li>For developers: <strong>Object of the class Patient. name: {name}, last_name: {last_name}, age: {age}</strong></li>
<li>For users: <strong>{name} {last_name}. {age}</strong></li>
</ul>
<p>For example, for object <code class="java">john = Patient("John", "Doe", 50)</code> these representations would respectively look like this:</p>
<ul>
<li><strong>Object of the class Patient. name: John, last_name: Doe, age: 50</strong></li>
<li><strong>John Doe. 50</strong></li>
</ul>
<p>Create the necessary methods below. Pay attention to spaces and punctuation in the strings.</p>
<p> <button class="btn-sm btn-outline-secondary" onclick="getElementById('hint-747').style.display='inline'"> Hint </button> </p>
<div id="hint-747" style="display:none;">
Unambiguous representation can be defined within
<code class="java">__repr__</code>.
</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/7139">Show topic summary</a>