<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="sv">
	<id>https://wikiskola.se/index.php?action=history&amp;feed=atom&amp;title=Br%C3%A5k_i_Python</id>
	<title>Bråk i Python - Versionshistorik</title>
	<link rel="self" type="application/atom+xml" href="https://wikiskola.se/index.php?action=history&amp;feed=atom&amp;title=Br%C3%A5k_i_Python"/>
	<link rel="alternate" type="text/html" href="https://wikiskola.se/index.php?title=Br%C3%A5k_i_Python&amp;action=history"/>
	<updated>2026-05-05T02:32:00Z</updated>
	<subtitle>Versionshistorik för denna sida på wikin</subtitle>
	<generator>MediaWiki 1.41.1</generator>
	<entry>
		<id>https://wikiskola.se/index.php?title=Br%C3%A5k_i_Python&amp;diff=47826&amp;oldid=prev</id>
		<title>TomasWestman: /* Koden */</title>
		<link rel="alternate" type="text/html" href="https://wikiskola.se/index.php?title=Br%C3%A5k_i_Python&amp;diff=47826&amp;oldid=prev"/>
		<updated>2018-09-05T06:43:19Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Koden&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;sv&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Äldre version&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Versionen från 5 september 2018 kl. 06.43&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l18&quot;&gt;Rad 18:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Rad 18:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;from fractions import Fraction&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;from fractions import Fraction&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;print(Fraction(355, 113))   &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;# 355/113&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;print(Fraction(355, 113))    &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;print(Fraction(2,3) + Fraction(3,4))   &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;# 17/12&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;print(Fraction(2,3) + Fraction(3,4))    &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;print(Fraction(2,3) * Fraction(3,4))   &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;# 1/2&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;print(Fraction(2,3) * Fraction(3,4))    &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>TomasWestman</name></author>
	</entry>
	<entry>
		<id>https://wikiskola.se/index.php?title=Br%C3%A5k_i_Python&amp;diff=46241&amp;oldid=prev</id>
		<title>Hakan den 3 april 2018 kl. 10.49</title>
		<link rel="alternate" type="text/html" href="https://wikiskola.se/index.php?title=Br%C3%A5k_i_Python&amp;diff=46241&amp;oldid=prev"/>
		<updated>2018-04-03T10:49:23Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;sv&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Äldre version&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Versionen från 3 april 2018 kl. 10.49&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot;&gt;Rad 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Rad 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Kategori:Python]] [[Kategori:Ma1c]] [[Kategori:Aritmetik]]  &lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Kategori:Python]] [[Kategori:Ma1c]] [[Kategori:Aritmetik&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;]] [[Kategori:Årskurs 7-9&lt;/ins&gt;]]  &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{python|[[Python|Python-hjälp]] - [https://wikiskola.se/index.php?title{{=}}Kategori:Python Fler exempel]}}&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{python|[[Python|Python-hjälp]] - [https://wikiskola.se/index.php?title{{=}}Kategori:Python Fler exempel]}}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{malruta| &amp;#039;&amp;#039;&amp;#039;Kom igång med programmering i matematiken.&amp;#039;&amp;#039;&amp;#039;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{malruta| &amp;#039;&amp;#039;&amp;#039;Kom igång med programmering i matematiken.&amp;#039;&amp;#039;&amp;#039;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Hakan</name></author>
	</entry>
	<entry>
		<id>https://wikiskola.se/index.php?title=Br%C3%A5k_i_Python&amp;diff=46037&amp;oldid=prev</id>
		<title>Hakan den 25 mars 2018 kl. 14.08</title>
		<link rel="alternate" type="text/html" href="https://wikiskola.se/index.php?title=Br%C3%A5k_i_Python&amp;diff=46037&amp;oldid=prev"/>
		<updated>2018-03-25T14:08:13Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;sv&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Äldre version&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Versionen från 25 mars 2018 kl. 14.08&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot;&gt;Rad 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Rad 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Kategori:Python]]  &lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Kategori:Python&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;]] [[Kategori:Ma1c]] [[Kategori:Aritmetik&lt;/ins&gt;]]  &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{python|[[Python|Python-hjälp]] - [https://wikiskola.se/index.php?title{{=}}Kategori:Python Fler exempel]}}&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{python|[[Python|Python-hjälp]] - [https://wikiskola.se/index.php?title{{=}}Kategori:Python Fler exempel]}}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{malruta| &amp;#039;&amp;#039;&amp;#039;Kom igång med programmering i matematiken.&amp;#039;&amp;#039;&amp;#039;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{malruta| &amp;#039;&amp;#039;&amp;#039;Kom igång med programmering i matematiken.&amp;#039;&amp;#039;&amp;#039;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Hakan</name></author>
	</entry>
	<entry>
		<id>https://wikiskola.se/index.php?title=Br%C3%A5k_i_Python&amp;diff=46024&amp;oldid=prev</id>
		<title>Hakan: Skapade sidan med &#039;Kategori:Python  {{python|Python-hjälp - [https://wikiskola.se/index.php?title{{=}}Kategori:Python Fler exempel]}} {{malruta| &#039;&#039;&#039;Kom igång med programmering i...&#039;</title>
		<link rel="alternate" type="text/html" href="https://wikiskola.se/index.php?title=Br%C3%A5k_i_Python&amp;diff=46024&amp;oldid=prev"/>
		<updated>2018-03-24T10:31:13Z</updated>

		<summary type="html">&lt;p&gt;Skapade sidan med &amp;#039;&lt;a href=&quot;/index.php/Kategori:Python&quot; title=&quot;Kategori:Python&quot;&gt;Kategori:Python&lt;/a&gt;  {{python|&lt;a href=&quot;/index.php/Python&quot; title=&quot;Python&quot;&gt;Python-hjälp&lt;/a&gt; - [https://wikiskola.se/index.php?title{{=}}Kategori:Python Fler exempel]}} {{malruta| &amp;#039;&amp;#039;&amp;#039;Kom igång med programmering i...&amp;#039;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Ny sida&lt;/b&gt;&lt;/p&gt;&lt;div&gt;[[Kategori:Python]] &lt;br /&gt;
{{python|[[Python|Python-hjälp]] - [https://wikiskola.se/index.php?title{{=}}Kategori:Python Fler exempel]}}&lt;br /&gt;
{{malruta| &amp;#039;&amp;#039;&amp;#039;Kom igång med programmering i matematiken.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Målet är att du ska köra ett enkelt program för att utföra matematiska beräkningar. &lt;br /&gt;
Du bör testa att modifiera algoritmen så att dina beräkningar blir mer effektiva.&lt;br /&gt;
&lt;br /&gt;
Målet är inte att du ska lära dig programmering på matematiklektionen men det är oundvikligt att du ändå lär dig lite Python-kod. &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Undersök hur Python hanterar bråk==&lt;br /&gt;
&lt;br /&gt;
Det här kodexemplet passar till avsnittet om bråk på Ma1a, Ma1b och Ma1c.&lt;br /&gt;
&lt;br /&gt;
=== Koden ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
from fractions import Fraction&lt;br /&gt;
&lt;br /&gt;
print(Fraction(355, 113))   # 355/113&lt;br /&gt;
print(Fraction(2,3) + Fraction(3,4))   # 17/12&lt;br /&gt;
print(Fraction(2,3) * Fraction(3,4))   # 1/2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Credit ===&lt;br /&gt;
&lt;br /&gt;
[https://en.m.wikibooks.org/wiki/Python_Programming/Math WikiBooks]&lt;br /&gt;
&lt;br /&gt;
=== Uppgift ===&lt;br /&gt;
&lt;br /&gt;
{{uppgruta| &amp;#039;&amp;#039;&amp;#039;Testa hur Python räknar division med bråk&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Lägg in en print-rad där du dividerar två bråk.&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Hakan</name></author>
	</entry>
</feed>