<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="et">
	<id>http://www.lambda.ee/w/index.php?action=history&amp;feed=atom&amp;title=Failit%C3%B6%C3%B6tluse_n%C3%A4itekood_pythonis</id>
	<title>Failitöötluse näitekood pythonis - Redigeerimiste ajalugu</title>
	<link rel="self" type="application/atom+xml" href="http://www.lambda.ee/w/index.php?action=history&amp;feed=atom&amp;title=Failit%C3%B6%C3%B6tluse_n%C3%A4itekood_pythonis"/>
	<link rel="alternate" type="text/html" href="http://www.lambda.ee/w/index.php?title=Failit%C3%B6%C3%B6tluse_n%C3%A4itekood_pythonis&amp;action=history"/>
	<updated>2026-11-07T00:57:59Z</updated>
	<subtitle>Selle lehekülje redigeerimiste ajalugu</subtitle>
	<generator>MediaWiki 1.43.11</generator>
	<entry>
		<id>http://www.lambda.ee/w/index.php?title=Failit%C3%B6%C3%B6tluse_n%C3%A4itekood_pythonis&amp;diff=15463&amp;oldid=prev</id>
		<title>Tammet – 14. veebruar 2019, kell 07:56</title>
		<link rel="alternate" type="text/html" href="http://www.lambda.ee/w/index.php?title=Failit%C3%B6%C3%B6tluse_n%C3%A4itekood_pythonis&amp;diff=15463&amp;oldid=prev"/>
		<updated>2019-02-14T07:56:52Z</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;et&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;←Vanem redaktsioon&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Redaktsioon: 14. veebruar 2019, kell 09:56&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;1. rida:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;1. rida:&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;Selle koodi eesmärk on lugeda sisse &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;kaks &lt;/del&gt;csv formaadis &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;faili &lt;/del&gt;naistenimed.txt ja meestenimed.txt ja teha nende pealt lihtsat statistikat.  &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;Selle koodi eesmärk on lugeda sisse csv formaadis &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;failid palgad.csv, &lt;/ins&gt;naistenimed.txt ja meestenimed.txt ja teha nende pealt lihtsat statistikat.  &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;div&gt;import sys&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;import sys&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key lambdadb:diff:1.41:old-15462:rev-15463:php=table --&gt;
&lt;/table&gt;</summary>
		<author><name>Tammet</name></author>
	</entry>
	<entry>
		<id>http://www.lambda.ee/w/index.php?title=Failit%C3%B6%C3%B6tluse_n%C3%A4itekood_pythonis&amp;diff=15462&amp;oldid=prev</id>
		<title>Tammet: Uus lehekülg: &#039;Selle koodi eesmärk on lugeda sisse kaks csv formaadis faili naistenimed.txt ja meestenimed.txt ja teha nende pealt lihtsat statistikat.  &lt;pre&gt; import sys  def loenimed(failinim...&#039;</title>
		<link rel="alternate" type="text/html" href="http://www.lambda.ee/w/index.php?title=Failit%C3%B6%C3%B6tluse_n%C3%A4itekood_pythonis&amp;diff=15462&amp;oldid=prev"/>
		<updated>2019-02-14T07:55:53Z</updated>

		<summary type="html">&lt;p&gt;Uus lehekülg: &amp;#039;Selle koodi eesmärk on lugeda sisse kaks csv formaadis faili naistenimed.txt ja meestenimed.txt ja teha nende pealt lihtsat statistikat.  &amp;lt;pre&amp;gt; import sys  def loenimed(failinim...&amp;#039;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Uus lehekülg&lt;/b&gt;&lt;/p&gt;&lt;div&gt;Selle koodi eesmärk on lugeda sisse kaks csv formaadis faili naistenimed.txt ja meestenimed.txt ja teha nende pealt lihtsat statistikat. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
import sys&lt;br /&gt;
&lt;br /&gt;
def loenimed(failinimi):&lt;br /&gt;
  sisend=open(failinimi)&lt;br /&gt;
  lines=sisend.readlines()&lt;br /&gt;
  i=0&lt;br /&gt;
  while i&amp;lt;len(lines):&lt;br /&gt;
    nimi=lines[i].strip()&lt;br /&gt;
    lines[i]=nimi&lt;br /&gt;
    i=i+1&lt;br /&gt;
  sisend.close()&lt;br /&gt;
  return lines&lt;br /&gt;
    &lt;br /&gt;
naistenimed=loenimed(&amp;quot;naistenimed.txt&amp;quot;)&lt;br /&gt;
meestenimed=loenimed(&amp;quot;meestenimed.txt&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
sisend=open(&amp;quot;palgad.csv&amp;quot;)&lt;br /&gt;
lines=sisend.readlines()&lt;br /&gt;
sisend.close()&lt;br /&gt;
#print(lines)&lt;br /&gt;
reanr=0&lt;br /&gt;
palgasumma=0&lt;br /&gt;
meestepalgasumma=0&lt;br /&gt;
naistepalgasumma=0&lt;br /&gt;
meestearv=0&lt;br /&gt;
naistearv=0&lt;br /&gt;
# nyyd tuleb tsykkel yle koigi inimeste&lt;br /&gt;
while reanr&amp;lt;len(lines):&lt;br /&gt;
  rida=lines[reanr]&lt;br /&gt;
  tykid=rida.split(&amp;quot;,&amp;quot;)&lt;br /&gt;
  if tykid[1]==&amp;quot;m&amp;quot; or tykid[1]==&amp;quot;M&amp;quot;:&lt;br /&gt;
    # meeste case&lt;br /&gt;
    meestearv=meestearv+1&lt;br /&gt;
    meestepalgasumma=meestepalgasumma+int(tykid[2])&lt;br /&gt;
  if tykid[1]==&amp;quot;n&amp;quot; or tykid[1]==&amp;quot;N&amp;quot;:&lt;br /&gt;
    # naiste case&lt;br /&gt;
    naistearv=naistearv+1&lt;br /&gt;
    naistepalgasumma=naistepalgasumma+int(tykid[2])&lt;br /&gt;
  if not (tykid[1] in [&amp;quot;m&amp;quot;,&amp;quot;M&amp;quot;,&amp;quot;n&amp;quot;,&amp;quot;N&amp;quot;]):&lt;br /&gt;
    if tykid[0] in meestenimed:&lt;br /&gt;
      meestearv=meestearv+1&lt;br /&gt;
      meestepalgasumma=meestepalgasumma+int(tykid[2])&lt;br /&gt;
    elif tykid[0] in naistenimed:&lt;br /&gt;
      naistearv=naistearv+1&lt;br /&gt;
      naistepalgasumma=naistepalgasumma+int(tykid[2])  &lt;br /&gt;
  &lt;br /&gt;
  palgasumma=palgasumma+int(tykid[2])  &lt;br /&gt;
  reanr=reanr+1&lt;br /&gt;
&lt;br /&gt;
print(&amp;quot;keskmine palk:&amp;quot;,palgasumma/len(lines))&lt;br /&gt;
print(&amp;quot;keskmine meeste palk:&amp;quot;,meestepalgasumma/meestearv)&lt;br /&gt;
print(&amp;quot;keskmine naiste palk:&amp;quot;,naistepalgasumma/naistearv)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Tammet</name></author>
	</entry>
</feed>