forked from pyvec/naucse.python.cz
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Deploying to gh-pages from @ 93d9681 🚀
- Loading branch information
Showing
15 changed files
with
2,631 additions
and
1 deletion.
There are no files selected for viewing
379 changes: 379 additions & 0 deletions
379
2024/pyladies-en-vienna-2024-spring/beginners-en/comparisons/index.html
Large diffs are not rendered by default.
Oops, something went wrong.
179 changes: 179 additions & 0 deletions
179
2024/pyladies-en-vienna-2024-spring/beginners-en/comparisons/index/solutions/0/index.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,179 @@ | ||
|
||
<!doctype html> | ||
<html lang="cs"> | ||
<head> | ||
<meta charset="utf-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> | ||
<title> | ||
|
||
Beginners course PyLadies Vienna: Comparison | ||
|
||
</title> | ||
|
||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" integrity="sha384-xOolHFLEh07PJGoPkLv1IbcEPTNtaed2xpHsD9ESMhqIYd0nLMwNLD69Npy4HI+N" crossorigin="anonymous"> | ||
|
||
|
||
|
||
<link rel="stylesheet" href="/static/css/naucse.css"> | ||
<link rel="stylesheet" href="/static/css/body.css"> | ||
<link rel="stylesheet" href="/static/css/pygments-lovelace-style.css"> | ||
<link rel="stylesheet" href="/static/css/ipython.css"> | ||
|
||
|
||
<link rel="canonical" href="https://naucse.python.cz/lessons/beginners-en/comparisons/" /> | ||
|
||
|
||
<style> | ||
|
||
|
||
|
||
</style> | ||
</head> | ||
|
||
<body> | ||
<nav class="header"> | ||
<ul class="container menu"> | ||
<li><a href="/" class="logo"><h1>PyLadies Vienna</h1></a></li> | ||
<li><a href="/sponsorship/" class="menu-link"><h2>Support Us</h2></a></li> | ||
<li><a href="/mentorship/" class="menu-link"><h2>Mentorship</h2></a></li> | ||
<li><a href="/runs/" class="menu-link"><h2>Courses</h2></a></li> | ||
</ul> | ||
</nav> | ||
|
||
|
||
|
||
<div class="page"> | ||
<div class="container"> | ||
|
||
|
||
|
||
|
||
|
||
<div class="lesson-content"> | ||
|
||
|
||
<h1>Comparison – Solution [0]</h1> | ||
|
||
|
||
<p>You can set the variable like this:</p> | ||
<div class="highlight"><pre><span></span><span class="n">side</span> <span class="o">=</span> <span class="nb">float</span><span class="p">(</span><span class="nb">input</span><span class="p">(</span><span class="s1">'Enter the side of a square in centimeters: '</span><span class="p">))</span> | ||
<span class="n">positive_number</span> <span class="o">=</span> <span class="n">side</span> <span class="o">></span> <span class="mi">0</span> | ||
</pre></div> | ||
|
||
|
||
</div> | ||
|
||
|
||
|
||
|
||
|
||
<div class="row prev-next"> | ||
|
||
|
||
|
||
|
||
<div class="col text-left"> | ||
<a href="/2024/pyladies-en-vienna-2024-spring/sessions/loops/">↑ <span class="d-none d-sm-inline">Lesson: Conditions, modules and functions</span></a> | ||
</div> | ||
|
||
|
||
|
||
|
||
<div class="col text-right"> | ||
<a href="/2024/pyladies-en-vienna-2024-spring/sessions/loops/back/"><span class="d-none d-sm-inline">End of lesson</span> →</a> | ||
</div> | ||
|
||
|
||
|
||
</div> | ||
|
||
|
||
|
||
|
||
</div> | ||
</div> | ||
|
||
|
||
|
||
<script type="text/javascript" src="/static/js/solutions.js"></script> | ||
|
||
<div class="footer container"> | ||
<hr> | ||
<div class="lesson-attribution"> | ||
|
||
|
||
<p>Translated by Marketa Muzikova and Alexandru Dumitru</p> | ||
|
||
<p>Originally written by Petr Viktorin, 2014-2017 for <a href="https://naucse.python.cz/course/pyladies/beginners/comparisons/">PyLadies CZ</a>.</p> | ||
|
||
|
||
|
||
<p> | ||
Licence: | ||
<a href="https://creativecommons.org/licenses/by-sa/4.0/"> | ||
Creative Commons Attribution-ShareAlike 4.0 International | ||
</a> | ||
</p> | ||
|
||
|
||
|
||
</div> | ||
</div> | ||
<footer> | ||
<div class="container"> | ||
<div class="global-pyladies"> | ||
© 2024 PyLadies Vienna. All rights reserved. | ||
<br> | ||
<a href="/agb/">Impressum, AGB</a> | ||
<br> | ||
We are a part of <a href="https://pyladies.com">international PyLadies</a>. | ||
</div> | ||
<ul> | ||
<li> | ||
<a href="https://discord.gg/v2qdvbD2dn" target="_blank"> | ||
<img src="/static/img/discord-logo.png"> | ||
</a> | ||
</li> | ||
<li> | ||
<a href="mailto:[email protected]" > | ||
<img src="/static/img/mail-white.png"> | ||
</a> | ||
</li> | ||
<li> | ||
<a href="https://twitter.com/pyladies_vie" target="_blank"> | ||
<img src="/static/img/twitter-white.png"> | ||
</a> | ||
</li> | ||
<li> | ||
<a href="https://www.instagram.com/pyladies_vienna" target="_blank"> | ||
<img src="/static/img/instagram-logo.png"> | ||
</a> | ||
</li> | ||
<li> | ||
<a href="https://github.com/UndeadFairy/pyladies_vienna" target="_blank"> | ||
<img src="/static/img/github-white.png"> | ||
</a> | ||
</li> | ||
<li> | ||
<a href="https://www.meetup.com/PyLadies-Vienna/" target="_blank"> | ||
<img src="/static/img/meetup.png"> | ||
</a> | ||
</li> | ||
<li data-toggle="tooltip" title="Linkedin"> | ||
<a href="https://www.linkedin.com/company/pyladies-vienna" target="_blank"> | ||
<img src="/static/img/linkedin-logo.png"> | ||
</a> | ||
</li> | ||
</ul> | ||
</div> | ||
<div class="clear"></div> | ||
</footer> | ||
|
||
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/jquery.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script> | ||
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/umd/popper.min.js" integrity="sha384-9/reFTGAW83EW2RDu2S0VKaIzap3H66lZH81PoYlFhbGU+6BZp6G7niu735Sk7lN" crossorigin="anonymous"></script> | ||
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-Fy6S3B9q64WdZWQUiU+q4/2Lc9npb8tCaSX9FK7E8HnRr0Jz8D6OP9dO5Vg3Q9ct" crossorigin="anonymous"></script> | ||
|
||
|
||
|
||
</body> | ||
</html> |
186 changes: 186 additions & 0 deletions
186
2024/pyladies-en-vienna-2024-spring/beginners-en/comparisons/index/solutions/1/index.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,186 @@ | ||
|
||
<!doctype html> | ||
<html lang="cs"> | ||
<head> | ||
<meta charset="utf-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> | ||
<title> | ||
|
||
Beginners course PyLadies Vienna: Comparison | ||
|
||
</title> | ||
|
||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" integrity="sha384-xOolHFLEh07PJGoPkLv1IbcEPTNtaed2xpHsD9ESMhqIYd0nLMwNLD69Npy4HI+N" crossorigin="anonymous"> | ||
|
||
|
||
|
||
<link rel="stylesheet" href="/static/css/naucse.css"> | ||
<link rel="stylesheet" href="/static/css/body.css"> | ||
<link rel="stylesheet" href="/static/css/pygments-lovelace-style.css"> | ||
<link rel="stylesheet" href="/static/css/ipython.css"> | ||
|
||
|
||
<link rel="canonical" href="https://naucse.python.cz/lessons/beginners-en/comparisons/" /> | ||
|
||
|
||
<style> | ||
|
||
|
||
|
||
</style> | ||
</head> | ||
|
||
<body> | ||
<nav class="header"> | ||
<ul class="container menu"> | ||
<li><a href="/" class="logo"><h1>PyLadies Vienna</h1></a></li> | ||
<li><a href="/sponsorship/" class="menu-link"><h2>Support Us</h2></a></li> | ||
<li><a href="/mentorship/" class="menu-link"><h2>Mentorship</h2></a></li> | ||
<li><a href="/runs/" class="menu-link"><h2>Courses</h2></a></li> | ||
</ul> | ||
</nav> | ||
|
||
|
||
|
||
<div class="page"> | ||
<div class="container"> | ||
|
||
|
||
|
||
|
||
|
||
<div class="lesson-content"> | ||
|
||
|
||
<h1>Comparison – Solution [1]</h1> | ||
|
||
|
||
<div class="highlight"><pre><span></span><span class="kn">from</span> <span class="nn">urllib.request</span> <span class="kn">import</span> <span class="n">urlopen</span> | ||
<span class="n">url</span> <span class="o">=</span> <span class="s2">"https://wttr.in/Vienna?format=%t"</span> | ||
<span class="n">temperature</span> <span class="o">=</span> <span class="nb">int</span><span class="p">(</span><span class="n">urlopen</span><span class="p">(</span><span class="n">url</span><span class="p">)</span><span class="o">.</span><span class="n">read</span><span class="p">()</span><span class="o">.</span><span class="n">decode</span><span class="p">()</span><span class="o">.</span><span class="n">strip</span><span class="p">(</span><span class="s2">"°C"</span><span class="p">))</span> | ||
|
||
<span class="k">if</span> <span class="n">temperature</span> <span class="o">>=</span> <span class="mi">20</span><span class="p">:</span> | ||
<span class="nb">print</span><span class="p">(</span><span class="s2">"No jacket needed, enjoy the warm temperature"</span><span class="p">)</span> | ||
<span class="k">elif</span> <span class="n">temperature</span> <span class="o">>=</span> <span class="mi">10</span><span class="p">:</span> | ||
<span class="nb">print</span><span class="p">(</span><span class="s2">"Light jacket recommended"</span><span class="p">)</span> | ||
<span class="k">else</span><span class="p">:</span> | ||
<span class="nb">print</span><span class="p">(</span><span class="s2">"It's freezing, you'll need a winter coat"</span><span class="p">)</span> | ||
</pre></div> | ||
|
||
|
||
</div> | ||
|
||
|
||
|
||
|
||
|
||
<div class="row prev-next"> | ||
|
||
|
||
|
||
|
||
<div class="col text-left"> | ||
<a href="/2024/pyladies-en-vienna-2024-spring/sessions/loops/">↑ <span class="d-none d-sm-inline">Lesson: Conditions, modules and functions</span></a> | ||
</div> | ||
|
||
|
||
|
||
|
||
<div class="col text-right"> | ||
<a href="/2024/pyladies-en-vienna-2024-spring/sessions/loops/back/"><span class="d-none d-sm-inline">End of lesson</span> →</a> | ||
</div> | ||
|
||
|
||
|
||
</div> | ||
|
||
|
||
|
||
|
||
</div> | ||
</div> | ||
|
||
|
||
|
||
<script type="text/javascript" src="/static/js/solutions.js"></script> | ||
|
||
<div class="footer container"> | ||
<hr> | ||
<div class="lesson-attribution"> | ||
|
||
|
||
<p>Translated by Marketa Muzikova and Alexandru Dumitru</p> | ||
|
||
<p>Originally written by Petr Viktorin, 2014-2017 for <a href="https://naucse.python.cz/course/pyladies/beginners/comparisons/">PyLadies CZ</a>.</p> | ||
|
||
|
||
|
||
<p> | ||
Licence: | ||
<a href="https://creativecommons.org/licenses/by-sa/4.0/"> | ||
Creative Commons Attribution-ShareAlike 4.0 International | ||
</a> | ||
</p> | ||
|
||
|
||
|
||
</div> | ||
</div> | ||
<footer> | ||
<div class="container"> | ||
<div class="global-pyladies"> | ||
© 2024 PyLadies Vienna. All rights reserved. | ||
<br> | ||
<a href="/agb/">Impressum, AGB</a> | ||
<br> | ||
We are a part of <a href="https://pyladies.com">international PyLadies</a>. | ||
</div> | ||
<ul> | ||
<li> | ||
<a href="https://discord.gg/v2qdvbD2dn" target="_blank"> | ||
<img src="/static/img/discord-logo.png"> | ||
</a> | ||
</li> | ||
<li> | ||
<a href="mailto:[email protected]" > | ||
<img src="/static/img/mail-white.png"> | ||
</a> | ||
</li> | ||
<li> | ||
<a href="https://twitter.com/pyladies_vie" target="_blank"> | ||
<img src="/static/img/twitter-white.png"> | ||
</a> | ||
</li> | ||
<li> | ||
<a href="https://www.instagram.com/pyladies_vienna" target="_blank"> | ||
<img src="/static/img/instagram-logo.png"> | ||
</a> | ||
</li> | ||
<li> | ||
<a href="https://github.com/UndeadFairy/pyladies_vienna" target="_blank"> | ||
<img src="/static/img/github-white.png"> | ||
</a> | ||
</li> | ||
<li> | ||
<a href="https://www.meetup.com/PyLadies-Vienna/" target="_blank"> | ||
<img src="/static/img/meetup.png"> | ||
</a> | ||
</li> | ||
<li data-toggle="tooltip" title="Linkedin"> | ||
<a href="https://www.linkedin.com/company/pyladies-vienna" target="_blank"> | ||
<img src="/static/img/linkedin-logo.png"> | ||
</a> | ||
</li> | ||
</ul> | ||
</div> | ||
<div class="clear"></div> | ||
</footer> | ||
|
||
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/jquery.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script> | ||
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/umd/popper.min.js" integrity="sha384-9/reFTGAW83EW2RDu2S0VKaIzap3H66lZH81PoYlFhbGU+6BZp6G7niu735Sk7lN" crossorigin="anonymous"></script> | ||
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-Fy6S3B9q64WdZWQUiU+q4/2Lc9npb8tCaSX9FK7E8HnRr0Jz8D6OP9dO5Vg3Q9ct" crossorigin="anonymous"></script> | ||
|
||
|
||
|
||
</body> | ||
</html> |
Oops, something went wrong.