-
Notifications
You must be signed in to change notification settings - Fork 0
/
task.html
17 lines (17 loc) · 1.02 KB
/
task.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<b>Conditions & nested lists</b> <a class=right href="https://hyperskill.org/learn/step/6944">Open on JetBrains Academy</a>
<br><br>
<html>
<head></head>
<body>
<p>This is a list of students and their grades for an exam: </p>
<pre><code class="language-python">students = [["Will", "B"], ["Kate", "B"], ["Max", "A"], ["Elsa", "C"], ["Alex", "B"], ["Chris", "A"]]</code></pre>
<p>Select only students with the best grade ("A") and print their names in a list. Do all this in one line.</p>
<p><button class="btn-sm btn-outline-secondary" onclick="getElementById('hint-333').style.display='inline'"> Hint </button> </p>
<div id="hint-333" style="display:none;">
You can create and print a list in one line if you start directly with
<code class="language-python">print([#your condition here])</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>
<a href="https://hyperskill.org/learn/step/6938">Show topic summary</a>