This commit is contained in:
Branko Kokanovic 2023-03-09 14:28:45 +01:00
parent 05c3c8c320
commit c57a519353
9 changed files with 661 additions and 0 deletions

11
.gitignore vendored Normal file
View File

@ -0,0 +1,11 @@
.idea/
*.iml
*.iws
*.eml
out/
.DS_Store
.svn
log/*.log
tmp/**
node_modules/
.sass-cache

7
.npmignore Normal file
View File

@ -0,0 +1,7 @@
/test
/examples
.github
.gulpfile
.sass-cache
gulpfile.js
CONTRIBUTING.md

178
cas1.html Normal file
View File

@ -0,0 +1,178 @@
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<title>Uvod u programiranje - 1. čas</title>
<link rel="stylesheet" href="dist/reset.css">
<link rel="stylesheet" href="dist/reveal.css">
<link rel="stylesheet" href="dist/theme/black.css">
<!-- Theme used for syntax highlighted code -->
<link rel="stylesheet" href="plugin/highlight/monokai.css">
</head>
<body>
<div class="reveal">
<div class="slides">
<section>
<p>Uvod u programiranje</p>
<p>1. čas</p>
</section>
<section>
O ovom kursu<br/><br/>
<ul>
<li class="fragment">Kurs za početnike</li>
<li class="fragment">Nećete se zaposliti posle ovog kursa:)</li>
<li class="fragment">Zašto Python?</li>
<ul>
<li class="fragment">Interpreterski programski jezik visokog nivoa opšte namene</li>
</ul>
</ul>
</section>
<section>
Podešavanje okruženja<br/>
<ul>
<li class="fragment">https://www.python.org</li>
<ul>
<li class="fragment">Idite na Download latest -> Files -> Windows Installer</li>
</ul>
<li class="fragment">Šta je IDE?</li>
<li class="fragment">https://www.jetbrains.com</li>
<ul>
<li class="fragment">Idite na Developer Tools -> PyCharm -> Download -> Community</li>
</ul>
</ul>
</section>
<section>
Igranje u Python konzoli?<br/>
<ul>
<li class="fragment">Otvorite PyCharm</li>
<li class="fragment">Napravite novi projekat</li>
<li class="fragment">U dnu nađite "Python Console"</li>
<ul>
<li class="fragment">REPL režim rada (Read-Evaluate-Print-Loop)</li>
</ul>
<li class="fragment">Unesite "1", "1+1", probajte pod znacima navoda nešto</li>
<li class="fragment">Da li radi puta</li>
<li class="fragment">Koliko veliki broj može da bude?</li>
<li class="fragment">Da li radi deljenje?</li>
</ul>
</section>
<section>
Aritmetičke operacije<br/>
<ul>
<li class="fragment">+, -. *, /</li>
<li class="fragment">** &mdash; stepenovanje</li>
<li class="fragment">// &mdash; deljenje bez ostatka</li>
<li class="fragment">% &mdash; ostatak</li>
</ul>
</section>
<section>
Prvi pravi program<br/>
<ul>
<li class="fragment">Napravite novi fajl, unesite "1+1" opet</li>
<li class="fragment">Program se pokreće desnim klikom na fajl, pa "Run ..."</li>
<li class="fragment">Run -> Run ... -> Edit Configuration</li>
<li class="fragment">Šta se desi kada pokrenete program?</li>
<li class="fragment">Print funkcija</li>
</ul>
</section>
<section>
Promenljive<br/>
<ul>
<li class="fragment">Šta su promenljive?</li>
<ul>
<li class="fragment">Promenljive (engl. <i>variables</i>) su imena koja dajemo mestima u memoriji gde čuvamo podatke</li>
</ul>
<li class="fragment">Kako se kreiraju promenljive</li>
<ul>
<li class="fragment">Sa znakom "=", npr. <code>a=5</code></li>
</ul>
<li class="fragment">Kako da ispišemo promenljive</li>
<ul>
<li class="fragment">Samo ih ispišemo u konzoli</li>
</ul>
<li class="fragment">Kako da dodelimo vrednost promenljivoj</li>
</ul>
</section>
<section>
Promenljive<br/>
<ul>
<li class="fragment">Ograničenja promenljivih</li>
<ul>
<li class="fragment">Promenljive ne mogu da počinju sa brojem</li>
<li class="fragment">Promenljive su case-sensitive</li>
</ul>
<li class="fragment">Stil je bitan u programiranju</li>
<ul>
<li class="fragment"><code>camelCase, PascalCase, snake_case</code></li>
</ul>
<li class="fragment">Primer računanja PDV-a preko promenljivih</li>
</ul>
</section>
<section>
Tipovi promenljivih<br/>
<ul>
<li class="fragment">Reprezentacija promenljive u memoriji</li>
<li class="fragment">Osnovni tipovi u Python-u: int, str, float, bool</li>
<li class="fragment">Kako saznati koji je tip neke promenljive?</li>
<ul>
<li class="fragment"><code>type(x)</code></li>
</ul>
<li class="fragment">Kako uraditi konverziju neke promenljive u drugi tip (engl. cast)</li>
<ul>
<li class="fragment"><code>int(x), str(x), float(x), bool(x)</code></li>
</ul>
</ul>
</section>
<section>
Ulaz i izlaz<br/>
<ul>
<li class="fragment">Print &mdash; ugrađena funkcija</li>
<ul>
<li class="fragment">Više argumenata, odvojenih zarezima</li>
</ul>
<li class="fragment">Input &mdash; isto ugrađena funkcija</li>
<ul>
<li class="fragment">Specijalni karakter "\n"</li>
<li class="fragment">Setite se konverzije u int</li>
</ul>
</ul>
</section>
<section>
Debugging<br/>
<ul>
<li class="fragment">Postavljanje breakpoint-a (srp. tačka prekida)</li>
<li class="fragment">Run -> Debug</li>
<li class="fragment">Step over</li>
<li class="fragment">Watch</li>
</ul>
</section>
<section>
Domaći<br/>
<ul>
<li class="fragment">Napisati program koji ispiše refren, haiku budite kreativni:)</li>
<li class="fragment">Napisati program koji pita korisnika za dužinu stranice i izračuna obim i površinu kvadrata</li>
<li class="fragment">Napisati program koji pita korisnika za ime, težinu i visinu i ispiše mu BMI. Zatim ispiše koliko korisnik minimalni broj kilograma treba da ima i koliko treba da smrša još</li>
<li class="fragment">U REPL konzoli raditi "import this" da vidite Python ZEN</li>
</ul>
</section>
</div>
</div>
<script src="dist/reveal.js"></script>
<script>
// More info about initialization & config:
// - https://revealjs.com/initialization/
// - https://revealjs.com/config/
Reveal.initialize({
hash: true,
// Learn about plugins: https://revealjs.com/plugins/
plugins: [ ]
});
</script>
</body>
</html>

30
dist/reset.css vendored Normal file
View File

@ -0,0 +1,30 @@
/* http://meyerweb.com/eric/tools/css/reset/
v4.0 | 20180602
License: none (public domain)
*/
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup,
main, menu, nav, output, ruby, section, summary,
time, mark, audio, video {
margin: 0;
padding: 0;
border: 0;
font-size: 100%;
font: inherit;
vertical-align: baseline;
}
/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure,
footer, header, hgroup, main, menu, nav, section {
display: block;
}

12
dist/reveal.css vendored Normal file

File diff suppressed because one or more lines are too long

9
dist/reveal.esm.js vendored Normal file

File diff suppressed because one or more lines are too long

9
dist/reveal.js vendored Normal file

File diff suppressed because one or more lines are too long

357
dist/theme/black.css vendored Normal file
View File

@ -0,0 +1,357 @@
/**
* Black theme for reveal.js. This is the opposite of the 'white' theme.
*
* By Hakim El Hattab, http://hakim.se
*/
@import url(./fonts/source-sans-pro/source-sans-pro.css);
section.has-light-background, section.has-light-background h1, section.has-light-background h2, section.has-light-background h3, section.has-light-background h4, section.has-light-background h5, section.has-light-background h6 {
color: #222;
}
/*********************************************
* GLOBAL STYLES
*********************************************/
:root {
--r-background-color: #191919;
--r-main-font: Source Sans Pro, Helvetica, sans-serif;
--r-main-font-size: 42px;
--r-main-color: #fff;
--r-block-margin: 20px;
--r-heading-margin: 0 0 20px 0;
--r-heading-font: Source Sans Pro, Helvetica, sans-serif;
--r-heading-color: #fff;
--r-heading-line-height: 1.2;
--r-heading-letter-spacing: normal;
--r-heading-text-transform: uppercase;
--r-heading-text-shadow: none;
--r-heading-font-weight: 600;
--r-heading1-text-shadow: none;
--r-heading1-size: 2.5em;
--r-heading2-size: 1.6em;
--r-heading3-size: 1.3em;
--r-heading4-size: 1em;
--r-code-font: monospace;
--r-link-color: #42affa;
--r-link-color-dark: #068de9;
--r-link-color-hover: #8dcffc;
--r-selection-background-color: #bee4fd;
--r-selection-color: #fff;
}
.reveal-viewport {
background: #191919;
background-color: var(--r-background-color);
}
.reveal {
font-family: var(--r-main-font);
font-size: var(--r-main-font-size);
font-weight: normal;
color: var(--r-main-color);
}
.reveal ::selection {
color: var(--r-selection-color);
background: var(--r-selection-background-color);
text-shadow: none;
}
.reveal ::-moz-selection {
color: var(--r-selection-color);
background: var(--r-selection-background-color);
text-shadow: none;
}
.reveal .slides section,
.reveal .slides section > section {
line-height: 1.3;
font-weight: inherit;
}
/*********************************************
* HEADERS
*********************************************/
.reveal h1,
.reveal h2,
.reveal h3,
.reveal h4,
.reveal h5,
.reveal h6 {
margin: var(--r-heading-margin);
color: var(--r-heading-color);
font-family: var(--r-heading-font);
font-weight: var(--r-heading-font-weight);
line-height: var(--r-heading-line-height);
letter-spacing: var(--r-heading-letter-spacing);
text-transform: var(--r-heading-text-transform);
text-shadow: var(--r-heading-text-shadow);
word-wrap: break-word;
}
.reveal h1 {
font-size: var(--r-heading1-size);
}
.reveal h2 {
font-size: var(--r-heading2-size);
}
.reveal h3 {
font-size: var(--r-heading3-size);
}
.reveal h4 {
font-size: var(--r-heading4-size);
}
.reveal h1 {
text-shadow: var(--r-heading1-text-shadow);
}
/*********************************************
* OTHER
*********************************************/
.reveal p {
margin: var(--r-block-margin) 0;
line-height: 1.3;
}
/* Remove trailing margins after titles */
.reveal h1:last-child,
.reveal h2:last-child,
.reveal h3:last-child,
.reveal h4:last-child,
.reveal h5:last-child,
.reveal h6:last-child {
margin-bottom: 0;
}
/* Ensure certain elements are never larger than the slide itself */
.reveal img,
.reveal video,
.reveal iframe {
max-width: 95%;
max-height: 95%;
}
.reveal strong,
.reveal b {
font-weight: bold;
}
.reveal em {
font-style: italic;
}
.reveal ol,
.reveal dl,
.reveal ul {
display: inline-block;
text-align: left;
margin: 0 0 0 1em;
}
.reveal ol {
list-style-type: decimal;
}
.reveal ul {
list-style-type: disc;
}
.reveal ul ul {
list-style-type: square;
}
.reveal ul ul ul {
list-style-type: circle;
}
.reveal ul ul,
.reveal ul ol,
.reveal ol ol,
.reveal ol ul {
display: block;
margin-left: 40px;
}
.reveal dt {
font-weight: bold;
}
.reveal dd {
margin-left: 40px;
}
.reveal blockquote {
display: block;
position: relative;
width: 70%;
margin: var(--r-block-margin) auto;
padding: 5px;
font-style: italic;
background: rgba(255, 255, 255, 0.05);
box-shadow: 0px 0px 2px rgba(0, 0, 0, 0.2);
}
.reveal blockquote p:first-child,
.reveal blockquote p:last-child {
display: inline-block;
}
.reveal q {
font-style: italic;
}
.reveal pre {
display: block;
position: relative;
width: 90%;
margin: var(--r-block-margin) auto;
text-align: left;
font-size: 0.55em;
font-family: var(--r-code-font);
line-height: 1.2em;
word-wrap: break-word;
box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.15);
}
.reveal code {
font-family: var(--r-code-font);
text-transform: none;
tab-size: 2;
}
.reveal pre code {
display: block;
padding: 5px;
overflow: auto;
max-height: 400px;
word-wrap: normal;
}
.reveal .code-wrapper {
white-space: normal;
}
.reveal .code-wrapper code {
white-space: pre;
}
.reveal table {
margin: auto;
border-collapse: collapse;
border-spacing: 0;
}
.reveal table th {
font-weight: bold;
}
.reveal table th,
.reveal table td {
text-align: left;
padding: 0.2em 0.5em 0.2em 0.5em;
border-bottom: 1px solid;
}
.reveal table th[align=center],
.reveal table td[align=center] {
text-align: center;
}
.reveal table th[align=right],
.reveal table td[align=right] {
text-align: right;
}
.reveal table tbody tr:last-child th,
.reveal table tbody tr:last-child td {
border-bottom: none;
}
.reveal sup {
vertical-align: super;
font-size: smaller;
}
.reveal sub {
vertical-align: sub;
font-size: smaller;
}
.reveal small {
display: inline-block;
font-size: 0.6em;
line-height: 1.2em;
vertical-align: top;
}
.reveal small * {
vertical-align: top;
}
.reveal img {
margin: var(--r-block-margin) 0;
}
/*********************************************
* LINKS
*********************************************/
.reveal a {
color: var(--r-link-color);
text-decoration: none;
transition: color 0.15s ease;
}
.reveal a:hover {
color: var(--r-link-color-hover);
text-shadow: none;
border: none;
}
.reveal .roll span:after {
color: #fff;
background: var(--r-link-color-dark);
}
/*********************************************
* Frame helper
*********************************************/
.reveal .r-frame {
border: 4px solid var(--r-main-color);
box-shadow: 0 0 10px rgba(0, 0, 0, 0.15);
}
.reveal a .r-frame {
transition: all 0.15s linear;
}
.reveal a:hover .r-frame {
border-color: var(--r-link-color);
box-shadow: 0 0 20px rgba(0, 0, 0, 0.55);
}
/*********************************************
* NAVIGATION CONTROLS
*********************************************/
.reveal .controls {
color: var(--r-link-color);
}
/*********************************************
* PROGRESS BAR
*********************************************/
.reveal .progress {
background: rgba(0, 0, 0, 0.2);
color: var(--r-link-color);
}
/*********************************************
* PRINT BACKGROUND
*********************************************/
@media print {
.backgrounds {
background-color: var(--r-background-color);
}
}

48
index.html Normal file
View File

@ -0,0 +1,48 @@
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<title>Uvod u programiranje</title>
<link rel="stylesheet" href="dist/reset.css">
<link rel="stylesheet" href="dist/reveal.css">
<link rel="stylesheet" href="dist/theme/black.css">
<!-- Theme used for syntax highlighted code -->
<link rel="stylesheet" href="plugin/highlight/monokai.css">
</head>
<body>
<div class="reveal">
<div class="slides">
<section>
<h3>Uvod u programiranje</h3>
<ul>
<li><a href="cas1.html">1. čas (10.03.2023.)</a></li>
<li>2. čas</li>
<li>3. čas</li>
<li>4. čas</li>
<li>5. čas</li>
<li>6. čas</li>
<li>7. čas</li>
<li>8. čas</li>
</ul>
</section>
</div>
</div>
<script src="dist/reveal.js"></script>
<script>
// More info about initialization & config:
// - https://revealjs.com/initialization/
// - https://revealjs.com/config/
Reveal.initialize({
hash: true,
// Learn about plugins: https://revealjs.com/plugins/
plugins: [ ]
});
</script>
</body>
</html>