<div dir="auto">Yk non viene mai azzerata. </div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Il mar 15 feb 2022, 14:04 Gabriele Battaglia <<a href="mailto:iz4apu@libero.it">iz4apu@libero.it</a>> ha scritto:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>
<p>Questo semplice script con 2 while annidati:</p>
<p><br>
</p>
<div style="color:#d4d4d4;background-color:#1e1e1e;font-family:Consolas,'Courier New',monospace;font-weight:normal;font-size:10px;line-height:14px;white-space:pre-wrap"><div><span style="color:#6a9955">#testwhile</span></div><div><span style="color:#9cdcfe">yi</span><span style="color:#d4d4d4">,</span><span style="color:#9cdcfe">yk</span><span style="color:#d4d4d4">=</span><span style="color:#b5cea8">0</span><span style="color:#d4d4d4">,</span><span style="color:#b5cea8">0</span></div><div><span style="color:#c586c0">while</span><span style="color:#d4d4d4"> </span><span style="color:#9cdcfe">yi</span><span style="color:#d4d4d4"><</span><span style="color:#b5cea8">2</span><span style="color:#d4d4d4">:</span></div><div><span style="color:#d4d4d4"> </span><span style="color:#c586c0">while</span><span style="color:#d4d4d4"> </span><span style="color:#9cdcfe">yk</span><span style="color:#d4d4d4"><</span><span style="color:#b5cea8">5</span><span style="color:#d4d4d4">:</span></div><div><span style="color:#d4d4d4"> </span><span style="color:#dcdcaa">print</span><span style="color:#d4d4d4">(</span><span style="color:#9cdcfe">yi</span><span style="color:#d4d4d4">,</span><span style="color:#9cdcfe">yk</span><span style="color:#d4d4d4">)</span></div><div><span style="color:#d4d4d4"> </span><span style="color:#9cdcfe">yk</span><span style="color:#d4d4d4">+=</span><span style="color:#b5cea8">1</span></div><div><span style="color:#d4d4d4"> </span><span style="color:#9cdcfe">yi</span><span style="color:#d4d4d4">+=</span><span style="color:#b5cea8">1</span></div><div><span style="color:#b5cea8">
</span></div><div><span style="color:#b5cea8">output:</span></div><div><span style="color:#b5cea8">e:\Dropbox\py>testwhile
0 0
0 1
0 2
0 3
0 4
e:\Dropbox\py>
</span></div><div><span style="color:#b5cea8">
</span></div><div><span style="color:#b5cea8">Ma sogno o son desktop?</span></div><div><span style="color:#b5cea8">Perchè la yi non diventa 1 e fa ripetere una seconda volta, il ciclo più interno?</span></div><div><span style="color:#b5cea8">
</span></div><div><span style="color:#b5cea8">Gabry.
</span></div></div>
<pre cols="72">--
--... ...-- -.. . .. --.. ....- .- .--. ..- - ..- . .
Sent from TB on Windows 10, Genus Bononiae's computer.</pre>
</div>
_______________________________________________<br>
Python mailing list<br>
<a href="mailto:Python@lists.python.it" target="_blank" rel="noreferrer">Python@lists.python.it</a><br>
<a href="https://lists.python.it/mailman/listinfo/python" rel="noreferrer noreferrer" target="_blank">https://lists.python.it/mailman/listinfo/python</a><br>
</blockquote></div>