<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="https://peda.net/:static/539/atom.xsl"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title>8. lokakuuta 2025</title>
<id>https://peda.net/id/352a953aa36</id>
<updated>2025-10-08T10:42:59+03:00</updated>
<link href="https://peda.net/id/352a953aa36:atom" rel="self" />
<link href="https://peda.net/orivesi/perusopetus/yhteiskoulu/oppiaineet/tietoteknikka/tvt-ja-ohjelmointikurssi-25-26/8.-lokakuuta#top" rel="alternate" />
<logo>https://peda.net/:static/539/peda.net.logo.bg.svg</logo>
<rights type="html">&lt;div class=&quot;license&quot;&gt;Tämän sivun lisenssi &lt;a rel=&quot;license&quot; href=&quot;https://peda.net/info&quot;&gt;Peda.net-yleislisenssi&lt;/a&gt;&lt;/div&gt;&#10;</rights>

<entry>
<title>Python perusteita: tietotyypit eli millaisena tietoa pidetään keskusmuistissa</title>
<id>https://peda.net/id/635944f6a36</id>
<updated>2025-10-07T14:51:05+03:00</updated>
<link href="https://peda.net/orivesi/perusopetus/yhteiskoulu/oppiaineet/tietoteknikka/tvt-ja-ohjelmointikurssi-25-26/8.-lokakuuta/python-perusteita-tietotyypit-eli-millaisena-tietoa-pidetaan#top" />
<content type="html">&lt;h3&gt;&lt;!--filtered attribute: data-start=&quot;118&quot;--&gt;&lt;!--filtered attribute: data-end=&quot;147&quot;--&gt;🧮 &lt;strong&gt;&lt;!--filtered attribute: data-start=&quot;125&quot;--&gt;&lt;!--filtered attribute: data-end=&quot;132&quot;--&gt;int&lt;/strong&gt; (kokonaisluku)&lt;/h3&gt;&#10;&lt;ul&gt;&lt;!--filtered attribute: data-start=&quot;148&quot;--&gt;&lt;!--filtered attribute: data-end=&quot;286&quot;--&gt;&#10;&lt;li&gt;&lt;!--filtered attribute: data-start=&quot;148&quot;--&gt;&lt;!--filtered attribute: data-end=&quot;200&quot;--&gt;&#10;&lt;p&gt;&lt;!--filtered attribute: data-start=&quot;150&quot;--&gt;&lt;!--filtered attribute: data-end=&quot;200&quot;--&gt;Käytetään &lt;strong&gt;&lt;!--filtered attribute: data-start=&quot;160&quot;--&gt;&lt;!--filtered attribute: data-end=&quot;184&quot;--&gt;kokonaisiin lukuihin&lt;/strong&gt; — ei pilkkua.&lt;/p&gt;&#10;&lt;/li&gt;&#10;&lt;li&gt;&lt;!--filtered attribute: data-start=&quot;201&quot;--&gt;&lt;!--filtered attribute: data-end=&quot;251&quot;--&gt;&#10;&lt;p&gt;&lt;!--filtered attribute: data-start=&quot;203&quot;--&gt;&lt;!--filtered attribute: data-end=&quot;217&quot;--&gt;Esimerkiksi:&lt;/p&gt;&#10;&lt;div class=&quot;contain-inline-size rounded-2xl relative bg-token-sidebar-surface-primary&quot;&gt;&#10;&lt;div class=&quot;sticky top-9&quot;&gt;&#10;&lt;div class=&quot;absolute end-0 bottom-0 flex h-9 items-center pe-2&quot;&gt;&#10;&lt;div class=&quot;bg-token-bg-elevated-secondary text-token-text-secondary flex items-center gap-4 rounded-sm px-2 font-sans text-xs&quot;&gt; &lt;/div&gt;&#10;&lt;/div&gt;&#10;&lt;/div&gt;&#10;&lt;div class=&quot;overflow-y-auto p-4&quot; dir=&quot;ltr&quot;&gt;&lt;code class=&quot;whitespace-pre! language-python&quot;&gt;&lt;span&gt;&lt;span class=&quot;hljs-number&quot;&gt;5&lt;/span&gt;&#10;-&lt;span class=&quot;hljs-number&quot;&gt;2&lt;/span&gt;&#10;&lt;span class=&quot;hljs-number&quot;&gt;1000&lt;/span&gt;&#10;&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;&#10;&lt;/div&gt;&#10;&lt;/li&gt;&#10;&lt;li&gt;&lt;!--filtered attribute: data-start=&quot;252&quot;--&gt;&lt;!--filtered attribute: data-end=&quot;286&quot;--&gt;&#10;&lt;p&gt;&lt;!--filtered attribute: data-start=&quot;254&quot;--&gt;&lt;!--filtered attribute: data-end=&quot;286&quot;--&gt;Näillä voi laskea: &lt;code&gt;&lt;!--filtered attribute: data-start=&quot;273&quot;--&gt;&lt;!--filtered attribute: data-end=&quot;280&quot;--&gt;5 + 3&lt;/code&gt; → &lt;code&gt;&lt;!--filtered attribute: data-start=&quot;283&quot;--&gt;&lt;!--filtered attribute: data-end=&quot;286&quot;--&gt;8&lt;/code&gt;&lt;/p&gt;&#10;&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;hr&gt;&lt;/hr&gt;&lt;!--filtered attribute: data-start=&quot;288&quot;--&gt;&lt;!--filtered attribute: data-end=&quot;291&quot;--&gt;&#10;&lt;h3&gt;&lt;!--filtered attribute: data-start=&quot;293&quot;--&gt;&lt;!--filtered attribute: data-end=&quot;325&quot;--&gt;🔢 &lt;strong&gt;&lt;!--filtered attribute: data-start=&quot;300&quot;--&gt;&lt;!--filtered attribute: data-end=&quot;309&quot;--&gt;float&lt;/strong&gt; (desimaaliluku)&lt;/h3&gt;&#10;&lt;ul&gt;&lt;!--filtered attribute: data-start=&quot;326&quot;--&gt;&lt;!--filtered attribute: data-end=&quot;510&quot;--&gt;&#10;&lt;li&gt;&lt;!--filtered attribute: data-start=&quot;326&quot;--&gt;&lt;!--filtered attribute: data-end=&quot;402&quot;--&gt;&#10;&lt;p&gt;&lt;!--filtered attribute: data-start=&quot;328&quot;--&gt;&lt;!--filtered attribute: data-end=&quot;402&quot;--&gt;Käytetään &lt;strong&gt;&lt;!--filtered attribute: data-start=&quot;338&quot;--&gt;&lt;!--filtered attribute: data-end=&quot;359&quot;--&gt;desimaalilukuihin&lt;/strong&gt; (eli luvut, joissa on pilkku tai piste).&lt;/p&gt;&#10;&lt;/li&gt;&#10;&lt;li&gt;&lt;!--filtered attribute: data-start=&quot;403&quot;--&gt;&lt;!--filtered attribute: data-end=&quot;455&quot;--&gt;&#10;&lt;p&gt;&lt;!--filtered attribute: data-start=&quot;405&quot;--&gt;&lt;!--filtered attribute: data-end=&quot;455&quot;--&gt;Pythonissa käytetään &lt;strong&gt;&lt;!--filtered attribute: data-start=&quot;426&quot;--&gt;&lt;!--filtered attribute: data-end=&quot;438&quot;--&gt;pistettä&lt;/strong&gt; pilkun sijaan!&lt;/p&gt;&#10;&lt;/li&gt;&#10;&lt;li&gt;&lt;!--filtered attribute: data-start=&quot;456&quot;--&gt;&lt;!--filtered attribute: data-end=&quot;510&quot;--&gt;&#10;&lt;p&gt;&lt;!--filtered attribute: data-start=&quot;458&quot;--&gt;&lt;!--filtered attribute: data-end=&quot;472&quot;--&gt;Esimerkiksi:&lt;/p&gt;&#10;&lt;div class=&quot;contain-inline-size rounded-2xl relative bg-token-sidebar-surface-primary&quot;&gt;&#10;&lt;div class=&quot;sticky top-9&quot;&gt;&#10;&lt;div class=&quot;absolute end-0 bottom-0 flex h-9 items-center pe-2&quot;&gt;&#10;&lt;div class=&quot;bg-token-bg-elevated-secondary text-token-text-secondary flex items-center gap-4 rounded-sm px-2 font-sans text-xs&quot;&gt; &lt;/div&gt;&#10;&lt;/div&gt;&#10;&lt;/div&gt;&#10;&lt;div class=&quot;overflow-y-auto p-4&quot; dir=&quot;ltr&quot;&gt;&lt;code class=&quot;whitespace-pre! language-python&quot;&gt;&lt;span&gt;&lt;span class=&quot;hljs-number&quot;&gt;3.14&lt;/span&gt;&#10;-&lt;span class=&quot;hljs-number&quot;&gt;0.5&lt;/span&gt;&#10;&lt;span class=&quot;hljs-number&quot;&gt;2.0&lt;/span&gt;&#10;&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;&#10;&lt;/div&gt;&#10;&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;hr&gt;&lt;/hr&gt;&lt;!--filtered attribute: data-start=&quot;512&quot;--&gt;&lt;!--filtered attribute: data-end=&quot;515&quot;--&gt;&#10;&lt;h3&gt;&lt;!--filtered attribute: data-start=&quot;517&quot;--&gt;&lt;!--filtered attribute: data-end=&quot;544&quot;--&gt;📝 &lt;strong&gt;&lt;!--filtered attribute: data-start=&quot;524&quot;--&gt;&lt;!--filtered attribute: data-end=&quot;531&quot;--&gt;str&lt;/strong&gt; (merkkijono)&lt;/h3&gt;&#10;&lt;ul&gt;&lt;!--filtered attribute: data-start=&quot;545&quot;--&gt;&lt;!--filtered attribute: data-end=&quot;737&quot;--&gt;&#10;&lt;li&gt;&lt;!--filtered attribute: data-start=&quot;545&quot;--&gt;&lt;!--filtered attribute: data-end=&quot;611&quot;--&gt;&#10;&lt;p&gt;&lt;!--filtered attribute: data-start=&quot;547&quot;--&gt;&lt;!--filtered attribute: data-end=&quot;611&quot;--&gt;Käytetään &lt;strong&gt;&lt;!--filtered attribute: data-start=&quot;557&quot;--&gt;&lt;!--filtered attribute: data-end=&quot;569&quot;--&gt;tekstiin&lt;/strong&gt; eli kirjaimiin, sanoihin ja lauseisiin.&lt;/p&gt;&#10;&lt;/li&gt;&#10;&lt;li&gt;&lt;!--filtered attribute: data-start=&quot;612&quot;--&gt;&lt;!--filtered attribute: data-end=&quot;665&quot;--&gt;&#10;&lt;p&gt;&lt;!--filtered attribute: data-start=&quot;614&quot;--&gt;&lt;!--filtered attribute: data-end=&quot;665&quot;--&gt;Teksti laitetaan &lt;strong&gt;&lt;!--filtered attribute: data-start=&quot;631&quot;--&gt;&lt;!--filtered attribute: data-end=&quot;652&quot;--&gt;lainausmerkkeihin&lt;/strong&gt; (&amp;quot; tai ').&lt;/p&gt;&#10;&lt;/li&gt;&#10;&lt;li&gt;&lt;!--filtered attribute: data-start=&quot;666&quot;--&gt;&lt;!--filtered attribute: data-end=&quot;737&quot;--&gt;&#10;&lt;p&gt;&lt;!--filtered attribute: data-start=&quot;668&quot;--&gt;&lt;!--filtered attribute: data-end=&quot;682&quot;--&gt;Esimerkiksi:&lt;/p&gt;&#10;&lt;div class=&quot;contain-inline-size rounded-2xl relative bg-token-sidebar-surface-primary&quot;&gt;&#10;&lt;div class=&quot;sticky top-9&quot;&gt;&#10;&lt;div class=&quot;absolute end-0 bottom-0 flex h-9 items-center pe-2&quot;&gt;&#10;&lt;div class=&quot;bg-token-bg-elevated-secondary text-token-text-secondary flex items-center gap-4 rounded-sm px-2 font-sans text-xs&quot;&gt; &lt;/div&gt;&#10;&lt;/div&gt;&#10;&lt;/div&gt;&#10;&lt;div class=&quot;overflow-y-auto p-4&quot; dir=&quot;ltr&quot;&gt;&lt;code class=&quot;whitespace-pre! language-python&quot;&gt;&lt;span&gt;&lt;span class=&quot;hljs-string&quot;&gt;&amp;quot;Hei maailma&amp;quot;&lt;/span&gt;&#10;&lt;span class=&quot;hljs-string&quot;&gt;'Python on kivaa!'&lt;/span&gt;&#10;&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;&#10;&lt;/div&gt;&#10;&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;hr&gt;&lt;/hr&gt;&lt;!--filtered attribute: data-start=&quot;739&quot;--&gt;&lt;!--filtered attribute: data-end=&quot;742&quot;--&gt;&#10;&lt;h3&gt;&lt;!--filtered attribute: data-start=&quot;744&quot;--&gt;&lt;!--filtered attribute: data-end=&quot;771&quot;--&gt;✅ &lt;strong&gt;&lt;!--filtered attribute: data-start=&quot;750&quot;--&gt;&lt;!--filtered attribute: data-end=&quot;758&quot;--&gt;bool&lt;/strong&gt; (totuusarvo)&lt;/h3&gt;&#10;&lt;ul&gt;&lt;!--filtered attribute: data-start=&quot;772&quot;--&gt;&lt;!--filtered attribute: data-end=&quot;911&quot;--&gt;&#10;&lt;li&gt;&lt;!--filtered attribute: data-start=&quot;772&quot;--&gt;&lt;!--filtered attribute: data-end=&quot;838&quot;--&gt;&#10;&lt;p&gt;&lt;!--filtered attribute: data-start=&quot;774&quot;--&gt;&lt;!--filtered attribute: data-end=&quot;838&quot;--&gt;Käytetään kun halutaan tietää onko jokin &lt;strong&gt;&lt;!--filtered attribute: data-start=&quot;815&quot;--&gt;&lt;!--filtered attribute: data-end=&quot;835&quot;--&gt;tosi tai epätosi&lt;/strong&gt;.&lt;/p&gt;&#10;&lt;/li&gt;&#10;&lt;li&gt;&lt;!--filtered attribute: data-start=&quot;839&quot;--&gt;&lt;!--filtered attribute: data-end=&quot;911&quot;--&gt;&#10;&lt;p&gt;&lt;!--filtered attribute: data-start=&quot;841&quot;--&gt;&lt;!--filtered attribute: data-end=&quot;858&quot;--&gt;Vain kaksi arvoa:&lt;/p&gt;&#10;&lt;div class=&quot;contain-inline-size rounded-2xl relative bg-token-sidebar-surface-primary&quot;&gt;&#10;&lt;div class=&quot;sticky top-9&quot;&gt;&#10;&lt;div class=&quot;absolute end-0 bottom-0 flex h-9 items-center pe-2&quot;&gt;&#10;&lt;div class=&quot;bg-token-bg-elevated-secondary text-token-text-secondary flex items-center gap-4 rounded-sm px-2 font-sans text-xs&quot;&gt; &lt;/div&gt;&#10;&lt;/div&gt;&#10;&lt;/div&gt;&#10;&lt;div class=&quot;overflow-y-auto p-4&quot; dir=&quot;ltr&quot;&gt;&lt;code class=&quot;whitespace-pre! language-python&quot;&gt;&lt;span&gt;&lt;span class=&quot;hljs-literal&quot;&gt;True&lt;/span&gt;   &lt;span class=&quot;hljs-comment&quot;&gt;# tosi&lt;/span&gt;&#10;&lt;span class=&quot;hljs-literal&quot;&gt;False&lt;/span&gt;  &lt;span class=&quot;hljs-comment&quot;&gt;# epätosi&lt;/span&gt;&#10;&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;&#10;&lt;/div&gt;&#10;&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;hr&gt;&lt;/hr&gt;&lt;!--filtered attribute: data-start=&quot;913&quot;--&gt;&lt;!--filtered attribute: data-end=&quot;916&quot;--&gt;&#10;&lt;h3&gt;&lt;!--filtered attribute: data-start=&quot;918&quot;--&gt;&lt;!--filtered attribute: data-end=&quot;941&quot;--&gt;📦 &lt;strong&gt;&lt;!--filtered attribute: data-start=&quot;925&quot;--&gt;&lt;!--filtered attribute: data-end=&quot;933&quot;--&gt;list&lt;/strong&gt; (lista)&lt;/h3&gt;&#10;&lt;ul&gt;&lt;!--filtered attribute: data-start=&quot;942&quot;--&gt;&lt;!--filtered attribute: data-end=&quot;1149&quot;--&gt;&#10;&lt;li&gt;&lt;!--filtered attribute: data-start=&quot;942&quot;--&gt;&lt;!--filtered attribute: data-end=&quot;1003&quot;--&gt;&#10;&lt;p&gt;&lt;!--filtered attribute: data-start=&quot;944&quot;--&gt;&lt;!--filtered attribute: data-end=&quot;1003&quot;--&gt;Käytetään &lt;strong&gt;&lt;!--filtered attribute: data-start=&quot;954&quot;--&gt;&lt;!--filtered attribute: data-end=&quot;1000&quot;--&gt;usean asian tallentamiseen yhteen paikkaan&lt;/strong&gt;.&lt;/p&gt;&#10;&lt;/li&gt;&#10;&lt;li&gt;&lt;!--filtered attribute: data-start=&quot;1004&quot;--&gt;&lt;!--filtered attribute: data-end=&quot;1068&quot;--&gt;&#10;&lt;p&gt;&lt;!--filtered attribute: data-start=&quot;1006&quot;--&gt;&lt;!--filtered attribute: data-end=&quot;1068&quot;--&gt;Asiat erotetaan pilkuilla ja laitetaan hakasulkeisiin &lt;code&gt;&lt;!--filtered attribute: data-start=&quot;1060&quot;--&gt;&lt;!--filtered attribute: data-end=&quot;1065&quot;--&gt;[ ]&lt;/code&gt;.&lt;/p&gt;&#10;&lt;/li&gt;&#10;&lt;li&gt;&lt;!--filtered attribute: data-start=&quot;1069&quot;--&gt;&lt;!--filtered attribute: data-end=&quot;1149&quot;--&gt;&#10;&lt;p&gt;&lt;!--filtered attribute: data-start=&quot;1071&quot;--&gt;&lt;!--filtered attribute: data-end=&quot;1085&quot;--&gt;Esimerkiksi:&lt;/p&gt;&#10;&lt;div class=&quot;contain-inline-size rounded-2xl relative bg-token-sidebar-surface-primary&quot;&gt;&#10;&lt;div class=&quot;sticky top-9&quot;&gt;&#10;&lt;div class=&quot;absolute end-0 bottom-0 flex h-9 items-center pe-2&quot;&gt;&#10;&lt;div class=&quot;bg-token-bg-elevated-secondary text-token-text-secondary flex items-center gap-4 rounded-sm px-2 font-sans text-xs&quot;&gt; &lt;/div&gt;&#10;&lt;/div&gt;&#10;&lt;/div&gt;&#10;&lt;div class=&quot;overflow-y-auto p-4&quot; dir=&quot;ltr&quot;&gt;&lt;code class=&quot;whitespace-pre! language-python&quot;&gt;&lt;span&gt;[&lt;span class=&quot;hljs-number&quot;&gt;1&lt;/span&gt;, &lt;span class=&quot;hljs-number&quot;&gt;2&lt;/span&gt;, &lt;span class=&quot;hljs-number&quot;&gt;3&lt;/span&gt;]&#10;[&lt;span class=&quot;hljs-string&quot;&gt;&amp;quot;omena&amp;quot;&lt;/span&gt;, &lt;span class=&quot;hljs-string&quot;&gt;&amp;quot;banaani&amp;quot;&lt;/span&gt;, &lt;span class=&quot;hljs-string&quot;&gt;&amp;quot;päärynä&amp;quot;&lt;/span&gt;]&#10;&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;&#10;&lt;/div&gt;&#10;&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;hr&gt;&lt;/hr&gt;&lt;!--filtered attribute: data-start=&quot;1151&quot;--&gt;&lt;!--filtered attribute: data-end=&quot;1154&quot;--&gt;&#10;&lt;h3&gt;&lt;!--filtered attribute: data-start=&quot;1156&quot;--&gt;&lt;!--filtered attribute: data-end=&quot;1170&quot;--&gt;Yhteenveto&lt;/h3&gt;&#10;&lt;div class=&quot;_tableContainer_1rjym_1&quot;&gt;&#10;&lt;div class=&quot;group _tableWrapper_1rjym_13 flex w-fit flex-col-reverse&quot;&gt;&#10;&lt;table class=&quot;w-fit min-w-(--thread-content-width)&quot;&gt;&lt;!--filtered attribute: data-start=&quot;1171&quot;--&gt;&lt;!--filtered attribute: data-end=&quot;1417&quot;--&gt;&#10;&lt;thead&gt;&lt;!--filtered attribute: data-start=&quot;1171&quot;--&gt;&lt;!--filtered attribute: data-end=&quot;1214&quot;--&gt;&#10;&lt;tr&gt;&lt;!--filtered attribute: data-start=&quot;1171&quot;--&gt;&lt;!--filtered attribute: data-end=&quot;1214&quot;--&gt;&#10;&lt;th&gt;&lt;!--filtered attribute: data-start=&quot;1171&quot;--&gt;&lt;!--filtered attribute: data-end=&quot;1180&quot;--&gt;&lt;!--filtered attribute: data-col-size=&quot;sm&quot;--&gt;Tyyppi&lt;/th&gt;&#10;&lt;th&gt;&lt;!--filtered attribute: data-start=&quot;1180&quot;--&gt;&lt;!--filtered attribute: data-end=&quot;1192&quot;--&gt;&lt;!--filtered attribute: data-col-size=&quot;sm&quot;--&gt;Esimerkki&lt;/th&gt;&#10;&lt;th&gt;&lt;!--filtered attribute: data-start=&quot;1192&quot;--&gt;&lt;!--filtered attribute: data-end=&quot;1214&quot;--&gt;&lt;!--filtered attribute: data-col-size=&quot;sm&quot;--&gt;Mitä se tarkoittaa&lt;/th&gt;&#10;&lt;/tr&gt;&#10;&lt;/thead&gt;&#10;&lt;tbody&gt;&lt;!--filtered attribute: data-start=&quot;1260&quot;--&gt;&lt;!--filtered attribute: data-end=&quot;1417&quot;--&gt;&#10;&lt;tr&gt;&lt;!--filtered attribute: data-start=&quot;1260&quot;--&gt;&lt;!--filtered attribute: data-end=&quot;1286&quot;--&gt;&#10;&lt;td&gt;&lt;!--filtered attribute: data-start=&quot;1260&quot;--&gt;&lt;!--filtered attribute: data-end=&quot;1266&quot;--&gt;&lt;!--filtered attribute: data-col-size=&quot;sm&quot;--&gt;int&lt;/td&gt;&#10;&lt;td&gt;&lt;!--filtered attribute: data-start=&quot;1266&quot;--&gt;&lt;!--filtered attribute: data-end=&quot;1270&quot;--&gt;&lt;!--filtered attribute: data-col-size=&quot;sm&quot;--&gt;5&lt;/td&gt;&#10;&lt;td&gt;&lt;!--filtered attribute: data-start=&quot;1270&quot;--&gt;&lt;!--filtered attribute: data-end=&quot;1286&quot;--&gt;&lt;!--filtered attribute: data-col-size=&quot;sm&quot;--&gt;Kokonaisluku&lt;/td&gt;&#10;&lt;/tr&gt;&#10;&lt;tr&gt;&lt;!--filtered attribute: data-start=&quot;1287&quot;--&gt;&lt;!--filtered attribute: data-end=&quot;1319&quot;--&gt;&#10;&lt;td&gt;&lt;!--filtered attribute: data-start=&quot;1287&quot;--&gt;&lt;!--filtered attribute: data-end=&quot;1295&quot;--&gt;&lt;!--filtered attribute: data-col-size=&quot;sm&quot;--&gt;float&lt;/td&gt;&#10;&lt;td&gt;&lt;!--filtered attribute: data-start=&quot;1295&quot;--&gt;&lt;!--filtered attribute: data-end=&quot;1302&quot;--&gt;&lt;!--filtered attribute: data-col-size=&quot;sm&quot;--&gt;3.14&lt;/td&gt;&#10;&lt;td&gt;&lt;!--filtered attribute: data-start=&quot;1302&quot;--&gt;&lt;!--filtered attribute: data-end=&quot;1319&quot;--&gt;&lt;!--filtered attribute: data-col-size=&quot;sm&quot;--&gt;Desimaaliluku&lt;/td&gt;&#10;&lt;/tr&gt;&#10;&lt;tr&gt;&lt;!--filtered attribute: data-start=&quot;1320&quot;--&gt;&lt;!--filtered attribute: data-end=&quot;1344&quot;--&gt;&#10;&lt;td&gt;&lt;!--filtered attribute: data-start=&quot;1320&quot;--&gt;&lt;!--filtered attribute: data-end=&quot;1326&quot;--&gt;&lt;!--filtered attribute: data-col-size=&quot;sm&quot;--&gt;str&lt;/td&gt;&#10;&lt;td&gt;&lt;!--filtered attribute: data-start=&quot;1326&quot;--&gt;&lt;!--filtered attribute: data-end=&quot;1334&quot;--&gt;&lt;!--filtered attribute: data-col-size=&quot;sm&quot;--&gt;&amp;quot;Hei&amp;quot;&lt;/td&gt;&#10;&lt;td&gt;&lt;!--filtered attribute: data-start=&quot;1334&quot;--&gt;&lt;!--filtered attribute: data-end=&quot;1344&quot;--&gt;&lt;!--filtered attribute: data-col-size=&quot;sm&quot;--&gt;Teksti&lt;/td&gt;&#10;&lt;/tr&gt;&#10;&lt;tr&gt;&lt;!--filtered attribute: data-start=&quot;1345&quot;--&gt;&lt;!--filtered attribute: data-end=&quot;1379&quot;--&gt;&#10;&lt;td&gt;&lt;!--filtered attribute: data-start=&quot;1345&quot;--&gt;&lt;!--filtered attribute: data-end=&quot;1352&quot;--&gt;&lt;!--filtered attribute: data-col-size=&quot;sm&quot;--&gt;bool&lt;/td&gt;&#10;&lt;td&gt;&lt;!--filtered attribute: data-start=&quot;1352&quot;--&gt;&lt;!--filtered attribute: data-end=&quot;1359&quot;--&gt;&lt;!--filtered attribute: data-col-size=&quot;sm&quot;--&gt;True&lt;/td&gt;&#10;&lt;td&gt;&lt;!--filtered attribute: data-start=&quot;1359&quot;--&gt;&lt;!--filtered attribute: data-end=&quot;1379&quot;--&gt;&lt;!--filtered attribute: data-col-size=&quot;sm&quot;--&gt;Tosi tai epätosi&lt;/td&gt;&#10;&lt;/tr&gt;&#10;&lt;tr&gt;&lt;!--filtered attribute: data-start=&quot;1380&quot;--&gt;&lt;!--filtered attribute: data-end=&quot;1417&quot;--&gt;&#10;&lt;td&gt;&lt;!--filtered attribute: data-start=&quot;1380&quot;--&gt;&lt;!--filtered attribute: data-end=&quot;1387&quot;--&gt;&lt;!--filtered attribute: data-col-size=&quot;sm&quot;--&gt;list&lt;/td&gt;&#10;&lt;td&gt;&lt;!--filtered attribute: data-start=&quot;1387&quot;--&gt;&lt;!--filtered attribute: data-end=&quot;1399&quot;--&gt;&lt;!--filtered attribute: data-col-size=&quot;sm&quot;--&gt;[1, 2, 3]&lt;/td&gt;&#10;&lt;td&gt;&lt;!--filtered attribute: data-start=&quot;1399&quot;--&gt;&lt;!--filtered attribute: data-end=&quot;1417&quot;--&gt;&lt;!--filtered attribute: data-col-size=&quot;sm&quot;--&gt;Lista asioista&lt;/td&gt;&#10;&lt;/tr&gt;&#10;&lt;/tbody&gt;&#10;&lt;/table&gt;&#10;&lt;br/&gt;&#10;&lt;br/&gt;&#10;&lt;br/&gt;&#10;&lt;h3&gt;&lt;!--filtered attribute: data-start=&quot;78&quot;--&gt;&lt;!--filtered attribute: data-end=&quot;116&quot;--&gt;🖥️ &lt;strong&gt;&lt;!--filtered attribute: data-start=&quot;86&quot;--&gt;&lt;!--filtered attribute: data-end=&quot;116&quot;--&gt;Käyttäjän syöte Pythonissa&lt;/strong&gt;&lt;/h3&gt;&#10;&lt;p&gt;&lt;!--filtered attribute: data-start=&quot;118&quot;--&gt;&lt;!--filtered attribute: data-end=&quot;199&quot;--&gt;Kun halutaan, että käyttäjä kirjoittaa jotain näppäimistöltä, käytetään komentoa:&lt;/p&gt;&#10;&lt;div class=&quot;contain-inline-size rounded-2xl relative bg-token-sidebar-surface-primary&quot;&gt;&#10;&lt;div class=&quot;sticky top-9&quot;&gt;&#10;&lt;div class=&quot;absolute end-0 bottom-0 flex h-9 items-center pe-2&quot;&gt;&#10;&lt;div class=&quot;bg-token-bg-elevated-secondary text-token-text-secondary flex items-center gap-4 rounded-sm px-2 font-sans text-xs&quot;&gt; &lt;/div&gt;&#10;&lt;/div&gt;&#10;&lt;/div&gt;&#10;&lt;div class=&quot;overflow-y-auto p-4&quot; dir=&quot;ltr&quot;&gt;&lt;code class=&quot;whitespace-pre! language-python&quot;&gt;&lt;span&gt;&lt;span class=&quot;hljs-built_in&quot;&gt;input&lt;/span&gt;()&#10;&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;&#10;&lt;/div&gt;&#10;&lt;p&gt;&lt;!--filtered attribute: data-start=&quot;224&quot;--&gt;&lt;!--filtered attribute: data-end=&quot;236&quot;--&gt;Esimerkiksi:&lt;/p&gt;&#10;&lt;div class=&quot;contain-inline-size rounded-2xl relative bg-token-sidebar-surface-primary&quot;&gt;&#10;&lt;div class=&quot;sticky top-9&quot;&gt;&#10;&lt;div class=&quot;absolute end-0 bottom-0 flex h-9 items-center pe-2&quot;&gt;&#10;&lt;div class=&quot;bg-token-bg-elevated-secondary text-token-text-secondary flex items-center gap-4 rounded-sm px-2 font-sans text-xs&quot;&gt; &lt;/div&gt;&#10;&lt;/div&gt;&#10;&lt;/div&gt;&#10;&lt;div class=&quot;overflow-y-auto p-4&quot; dir=&quot;ltr&quot;&gt;&lt;code class=&quot;whitespace-pre! language-python&quot;&gt;&lt;span&gt;nimi = &lt;span class=&quot;hljs-built_in&quot;&gt;input&lt;/span&gt;(&lt;span class=&quot;hljs-string&quot;&gt;&amp;quot;Mikä on nimesi? &amp;quot;&lt;/span&gt;)&#10;&lt;span class=&quot;hljs-built_in&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;hljs-string&quot;&gt;&amp;quot;Hei&amp;quot;&lt;/span&gt;, nimi)&#10;&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;&#10;&lt;/div&gt;&#10;&lt;p&gt;&lt;!--filtered attribute: data-start=&quot;304&quot;--&gt;&lt;!--filtered attribute: data-end=&quot;415&quot;--&gt;💡 &lt;strong&gt;&lt;!--filtered attribute: data-start=&quot;307&quot;--&gt;&lt;!--filtered attribute: data-end=&quot;319&quot;--&gt;Tärkeää:&lt;/strong&gt;&lt;br/&gt;&#10;&lt;!--filtered attribute: data-start=&quot;319&quot;--&gt;&lt;!--filtered attribute: data-end=&quot;322&quot;--&gt;&lt;code&gt;&lt;!--filtered attribute: data-start=&quot;322&quot;--&gt;&lt;!--filtered attribute: data-end=&quot;331&quot;--&gt;input()&lt;/code&gt; &lt;strong&gt;&lt;!--filtered attribute: data-start=&quot;332&quot;--&gt;&lt;!--filtered attribute: data-end=&quot;368&quot;--&gt;ottaa aina kaiken tekstinä (str)&lt;/strong&gt; – vaikka käyttäjä kirjoittaisi numeron!&lt;br/&gt;&#10;&lt;!--filtered attribute: data-start=&quot;408&quot;--&gt;&lt;!--filtered attribute: data-end=&quot;411&quot;--&gt;Eli:&lt;/p&gt;&#10;&lt;div class=&quot;contain-inline-size rounded-2xl relative bg-token-sidebar-surface-primary&quot;&gt;&#10;&lt;div class=&quot;sticky top-9&quot;&gt;&#10;&lt;div class=&quot;absolute end-0 bottom-0 flex h-9 items-center pe-2&quot;&gt;&#10;&lt;div class=&quot;bg-token-bg-elevated-secondary text-token-text-secondary flex items-center gap-4 rounded-sm px-2 font-sans text-xs&quot;&gt; &lt;/div&gt;&#10;&lt;/div&gt;&#10;&lt;/div&gt;&#10;&lt;div class=&quot;overflow-y-auto p-4&quot; dir=&quot;ltr&quot;&gt;&lt;code class=&quot;whitespace-pre! language-python&quot;&gt;&lt;span&gt;ika = &lt;span class=&quot;hljs-built_in&quot;&gt;input&lt;/span&gt;(&lt;span class=&quot;hljs-string&quot;&gt;&amp;quot;Kuinka vanha olet? &amp;quot;&lt;/span&gt;)&#10;&lt;span class=&quot;hljs-built_in&quot;&gt;print&lt;/span&gt;(ika + &lt;span class=&quot;hljs-number&quot;&gt;1&lt;/span&gt;)   &lt;span class=&quot;hljs-comment&quot;&gt;# Tämä EI toimi oikein!&lt;/span&gt;&#10;&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;&#10;&lt;/div&gt;&#10;&lt;p&gt;&lt;!--filtered attribute: data-start=&quot;507&quot;--&gt;&lt;!--filtered attribute: data-end=&quot;561&quot;--&gt;Tämä ei toimi, koska &lt;code&gt;&lt;!--filtered attribute: data-start=&quot;528&quot;--&gt;&lt;!--filtered attribute: data-end=&quot;533&quot;--&gt;ika&lt;/code&gt; on &lt;strong&gt;&lt;!--filtered attribute: data-start=&quot;537&quot;--&gt;&lt;!--filtered attribute: data-end=&quot;548&quot;--&gt;tekstiä&lt;/strong&gt;, ei lukua. (&lt;em&gt;Huom! Ei kannata käyttää skandeja: å, ä ja ö muuttujien nimissä!&lt;/em&gt;)&lt;/p&gt;&#10;&lt;hr&gt;&lt;/hr&gt;&lt;!--filtered attribute: data-start=&quot;563&quot;--&gt;&lt;!--filtered attribute: data-end=&quot;566&quot;--&gt;&#10;&lt;h3&gt;&lt;!--filtered attribute: data-start=&quot;568&quot;--&gt;&lt;!--filtered attribute: data-end=&quot;602&quot;--&gt;🔄 &lt;strong&gt;&lt;!--filtered attribute: data-start=&quot;575&quot;--&gt;&lt;!--filtered attribute: data-end=&quot;602&quot;--&gt;Tietotyypin muuttaminen&lt;/strong&gt;&lt;/h3&gt;&#10;&lt;p&gt;&lt;!--filtered attribute: data-start=&quot;604&quot;--&gt;&lt;!--filtered attribute: data-end=&quot;710&quot;--&gt;Jos halutaan, että käyttäjän antama tieto olisi &lt;strong&gt;&lt;!--filtered attribute: data-start=&quot;652&quot;--&gt;&lt;!--filtered attribute: data-end=&quot;662&quot;--&gt;numero&lt;/strong&gt;, se pitää &lt;strong&gt;&lt;!--filtered attribute: data-start=&quot;673&quot;--&gt;&lt;!--filtered attribute: data-end=&quot;684&quot;--&gt;muuttaa&lt;/strong&gt; (eli &lt;em&gt;&lt;!--filtered attribute: data-start=&quot;690&quot;--&gt;&lt;!--filtered attribute: data-end=&quot;706&quot;--&gt;muuntaa tyyppi&lt;/em&gt;).&lt;/p&gt;&#10;&lt;div class=&quot;_tableContainer_1rjym_1&quot;&gt;&#10;&lt;div class=&quot;group _tableWrapper_1rjym_13 flex w-fit flex-col-reverse&quot;&gt;&#10;&lt;table class=&quot;w-fit min-w-(--thread-content-width)&quot;&gt;&lt;!--filtered attribute: data-start=&quot;712&quot;--&gt;&lt;!--filtered attribute: data-end=&quot;1086&quot;--&gt;&#10;&lt;thead&gt;&lt;!--filtered attribute: data-start=&quot;712&quot;--&gt;&lt;!--filtered attribute: data-end=&quot;752&quot;--&gt;&#10;&lt;tr&gt;&lt;!--filtered attribute: data-start=&quot;712&quot;--&gt;&lt;!--filtered attribute: data-end=&quot;752&quot;--&gt;&#10;&lt;th&gt;&lt;!--filtered attribute: data-start=&quot;712&quot;--&gt;&lt;!--filtered attribute: data-end=&quot;729&quot;--&gt;&lt;!--filtered attribute: data-col-size=&quot;sm&quot;--&gt;Haluttu tyyppi&lt;/th&gt;&#10;&lt;th&gt;&lt;!--filtered attribute: data-start=&quot;729&quot;--&gt;&lt;!--filtered attribute: data-end=&quot;739&quot;--&gt;&lt;!--filtered attribute: data-col-size=&quot;sm&quot;--&gt;Komento&lt;/th&gt;&#10;&lt;th&gt;&lt;!--filtered attribute: data-start=&quot;739&quot;--&gt;&lt;!--filtered attribute: data-end=&quot;752&quot;--&gt;&lt;!--filtered attribute: data-col-size=&quot;md&quot;--&gt;Esimerkki&lt;/th&gt;&#10;&lt;/tr&gt;&#10;&lt;/thead&gt;&#10;&lt;tbody&gt;&lt;!--filtered attribute: data-start=&quot;796&quot;--&gt;&lt;!--filtered attribute: data-end=&quot;1086&quot;--&gt;&#10;&lt;tr&gt;&lt;!--filtered attribute: data-start=&quot;796&quot;--&gt;&lt;!--filtered attribute: data-end=&quot;872&quot;--&gt;&#10;&lt;td&gt;&lt;!--filtered attribute: data-start=&quot;796&quot;--&gt;&lt;!--filtered attribute: data-end=&quot;817&quot;--&gt;&lt;!--filtered attribute: data-col-size=&quot;sm&quot;--&gt;Kokonaisluku (int)&lt;/td&gt;&#10;&lt;td&gt;&lt;!--filtered attribute: data-start=&quot;817&quot;--&gt;&lt;!--filtered attribute: data-end=&quot;827&quot;--&gt;&lt;!--filtered attribute: data-col-size=&quot;sm&quot;--&gt;&lt;code&gt;&lt;!--filtered attribute: data-start=&quot;819&quot;--&gt;&lt;!--filtered attribute: data-end=&quot;826&quot;--&gt;int()&lt;/code&gt;&lt;/td&gt;&#10;&lt;td&gt;&lt;!--filtered attribute: data-start=&quot;827&quot;--&gt;&lt;!--filtered attribute: data-end=&quot;872&quot;--&gt;&lt;!--filtered attribute: data-col-size=&quot;md&quot;--&gt;&lt;code&gt;&lt;!--filtered attribute: data-start=&quot;829&quot;--&gt;&lt;!--filtered attribute: data-end=&quot;870&quot;--&gt;ika = int(input(&amp;quot;Kuinka vanha olet? &amp;quot;))&lt;/code&gt;&lt;/td&gt;&#10;&lt;/tr&gt;&#10;&lt;tr&gt;&lt;!--filtered attribute: data-start=&quot;873&quot;--&gt;&lt;!--filtered attribute: data-end=&quot;955&quot;--&gt;&#10;&lt;td&gt;&lt;!--filtered attribute: data-start=&quot;873&quot;--&gt;&lt;!--filtered attribute: data-end=&quot;897&quot;--&gt;&lt;!--filtered attribute: data-col-size=&quot;sm&quot;--&gt;Desimaaliluku (float)&lt;/td&gt;&#10;&lt;td&gt;&lt;!--filtered attribute: data-start=&quot;897&quot;--&gt;&lt;!--filtered attribute: data-end=&quot;909&quot;--&gt;&lt;!--filtered attribute: data-col-size=&quot;sm&quot;--&gt;&lt;code&gt;&lt;!--filtered attribute: data-start=&quot;899&quot;--&gt;&lt;!--filtered attribute: data-end=&quot;908&quot;--&gt;float()&lt;/code&gt;&lt;/td&gt;&#10;&lt;td&gt;&lt;!--filtered attribute: data-start=&quot;909&quot;--&gt;&lt;!--filtered attribute: data-end=&quot;955&quot;--&gt;&lt;!--filtered attribute: data-col-size=&quot;md&quot;--&gt;&lt;code&gt;&lt;!--filtered attribute: data-start=&quot;911&quot;--&gt;&lt;!--filtered attribute: data-end=&quot;953&quot;--&gt;mitta = float(input(&amp;quot;Anna pituutesi: &amp;quot;))&lt;/code&gt;&lt;/td&gt;&#10;&lt;/tr&gt;&#10;&lt;tr&gt;&lt;!--filtered attribute: data-start=&quot;956&quot;--&gt;&lt;!--filtered attribute: data-end=&quot;1086&quot;--&gt;&#10;&lt;td&gt;&lt;!--filtered attribute: data-start=&quot;956&quot;--&gt;&lt;!--filtered attribute: data-end=&quot;971&quot;--&gt;&lt;!--filtered attribute: data-col-size=&quot;sm&quot;--&gt;Teksti (str)&lt;/td&gt;&#10;&lt;td&gt;&lt;!--filtered attribute: data-start=&quot;971&quot;--&gt;&lt;!--filtered attribute: data-end=&quot;981&quot;--&gt;&lt;!--filtered attribute: data-col-size=&quot;sm&quot;--&gt;&lt;code&gt;&lt;!--filtered attribute: data-start=&quot;973&quot;--&gt;&lt;!--filtered attribute: data-end=&quot;980&quot;--&gt;str()&lt;/code&gt;&lt;/td&gt;&#10;&lt;td&gt;&lt;!--filtered attribute: data-start=&quot;981&quot;--&gt;&lt;!--filtered attribute: data-end=&quot;1086&quot;--&gt;&lt;!--filtered attribute: data-col-size=&quot;md&quot;--&gt;&lt;code&gt;&lt;!--filtered attribute: data-start=&quot;983&quot;--&gt;&lt;!--filtered attribute: data-end=&quot;1014&quot;--&gt;nimi = str(input(&amp;quot;Nimesi: &amp;quot;))&lt;/code&gt; &lt;em&gt;&lt;!--filtered attribute: data-start=&quot;1015&quot;--&gt;&lt;!--filtered attribute: data-end=&quot;1084&quot;--&gt;(tätä ei yleensä tarvitse erikseen tehdä, koska input antaa jo str)&lt;/em&gt;&lt;/td&gt;&#10;&lt;/tr&gt;&#10;&lt;/tbody&gt;&#10;&lt;/table&gt;&#10;&lt;br/&gt;&#10;&lt;br/&gt;&#10;&lt;h3&gt;Tavoitteet oppitunnille&lt;/h3&gt;&#10;Jatka Python-kielen opiskelua systemaattisesti: käy läpi kirjan tehtäviä. Kun saat tehtyä Kuutio 7:n harjoitukset, jatka Kuutio 8:n harjoituksiin.&lt;br/&gt;&#10;&lt;br/&gt;&#10;Käytä tarvitessasi tekoälöyä (Copilot, ChatGPT,...) apuna tehtävän tekemiseen ja tai sen muuttamiseen. &lt;br/&gt;&#10;&lt;br/&gt;&#10;Muista, että tavoiteena on nyt, että ymmärrät jokaista pilkkua myöten, mitä koodissa tehdään. Tämä ei ole vibe-codingia!&lt;br/&gt;&#10;&lt;br/&gt;&#10;Pidä paperista kirjanpitoa harjoittelustasi. Se auttaa pitämään työskentelyä systemaattisena (ja sen perusteella arvioidaan työskentelyäsi).&lt;/div&gt;&#10;&lt;/div&gt;&#10;&lt;/div&gt;&#10;&lt;/div&gt;&#10;</content>
<published>2025-10-07T14:04:26+03:00</published>
</entry>


</feed>