<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-15">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<meta http-equiv="content-type" content="text/html;
charset=iso-8859-15">
<pre style="background-color:#ffffff;color:#000000;font-family:'Courier New';font-size:9,0pt;">Scusate ma ci sto sbattendo la testa da 5 giorni e non riesco a capire dov'č che sbaglio. Sto testando queste poche righe di codice e
quando il programma mi chiede quale sia il numero uscito, scrivo 19 e proseguendo, nella schermata di riepilogo successiva mi ritrovo,
cosė come mi aspetto, che il ritardo di uscita manque sia incrementato di 1. Potete dirmi per cortesia, per quale diavolo di errore
ripetendo l'inserimento sempre dello stesso numero, nella schermata di riepilogo successiva invece di ritrovarmi con il ritardo di uscita
manque a 2 me lo ritrovo fermo a 1?
Ho seguito i passaggi uno ad uno anche con carta e penna, ho modificato il codice pių volte ma alla fine ottengo sempre lo stesso non voluto
risultato. Mi aiutate a capire?
Grazie
uscita_passe = <span style="color:#0000ff;">0
</span>uscita_manque = <span style="color:#0000ff;">0
</span>scommessa_semplice = (<span style="color:#008080;font-weight:bold;">"passe"</span>,<span style="color:#008080;font-weight:bold;">"manque"</span>)
scommessa_passe = <span style="color:#0000ff;">0
</span>scommessa_manque = <span style="color:#0000ff;">0
</span>tutti_i_numeri = (<span style="color:#0000ff;">0</span>,<span style="color:#0000ff;">1</span>,<span style="color:#0000ff;">2</span>,<span style="color:#0000ff;">3</span>,<span style="color:#0000ff;">4</span>,<span style="color:#0000ff;">5</span>,<span style="color:#0000ff;">6</span>,<span style="color:#0000ff;">7</span>,<span style="color:#0000ff;">8</span>,<span style="color:#0000ff;">9</span>,<span style="color:#0000ff;">10</span>,<span style="color:#0000ff;">11</span>,<span style="color:#0000ff;">12</span>,<span style="color:#0000ff;">13</span>,<span style="color:#0000ff;">14</span>,<span style="color:#0000ff;">15</span>,<span style="color:#0000ff;">16</span>,<span style="color:#0000ff;">17</span>,<span style="color:#0000ff;">18</span>,<span style="color:#0000ff;">19</span>,<span style="color:#0000ff;">20</span>,<span style="color:#0000ff;">21</span>,<span style="color:#0000ff;">22</span>,<span style="color:#0000ff;">23</span>,<span style="color:#0000ff;">24</span>,<span s
tyle="color:#0000ff;">25</span>,<span style="color:#0000ff;">26</span>,<span style="color:#0000ff;">27</span>,<span style="color:#0000ff;">28</span>,<span style="color:#0000ff;">29</span>,<span style="color:#0000ff;">30</span>,<span style="color:#0000ff;">31</span>,<span style="color:#0000ff;">32</span>,<span style="color:#0000ff;">33</span>,<span style="color:#0000ff;">34</span>,<span style="color:#0000ff;">35</span>,<span style="color:#0000ff;">36</span>)
passe = (<span style="color:#0000ff;">19</span>,<span style="color:#0000ff;">20</span>,<span style="color:#0000ff;">21</span>,<span style="color:#0000ff;">22</span>,<span style="color:#0000ff;">23</span>,<span style="color:#0000ff;">24</span>,<span style="color:#0000ff;">25</span>,<span style="color:#0000ff;">26</span>,<span style="color:#0000ff;">27</span>,<span style="color:#0000ff;">28</span>,<span style="color:#0000ff;">29</span>,<span style="color:#0000ff;">30</span>,<span style="color:#0000ff;">31</span>,<span style="color:#0000ff;">32</span>,<span style="color:#0000ff;">33</span>,<span style="color:#0000ff;">34</span>,<span style="color:#0000ff;">35</span>,<span style="color:#0000ff;">36</span>)
manque = (<span style="color:#0000ff;">1</span>,<span style="color:#0000ff;">2</span>,<span style="color:#0000ff;">3</span>,<span style="color:#0000ff;">4</span>,<span style="color:#0000ff;">5</span>,<span style="color:#0000ff;">6</span>,<span style="color:#0000ff;">7</span>,<span style="color:#0000ff;">8</span>,<span style="color:#0000ff;">9</span>,<span style="color:#0000ff;">10</span>,<span style="color:#0000ff;">11</span>,<span style="color:#0000ff;">12</span>,<span style="color:#0000ff;">13</span>,<span style="color:#0000ff;">14</span>,<span style="color:#0000ff;">15</span>,<span style="color:#0000ff;">16</span>,<span style="color:#0000ff;">17</span>,<span style="color:#0000ff;">18</span>)
liste_in_ritardo = []
puntate_possibili = (<span style="color:#008080;font-weight:bold;">"passe"</span>,<span style="color:#008080;font-weight:bold;">"manque"</span>,<span style="color:#008080;font-weight:bold;">"pari"</span>,<span style="color:#008080;font-weight:bold;">"dispari"</span>,<span style="color:#008080;font-weight:bold;">"nero"</span>,<span style="color:#008080;font-weight:bold;">"rosso"</span>,<span style="color:#008080;font-weight:bold;">"prima dozzina"</span>,<span style="color:#008080;font-weight:bold;">"seconda dozzina"</span>,<span style="color:#008080;font-weight:bold;">"terza dozzina"</span>,<span style="color:#008080;font-weight:bold;">"prima colonna"</span>,<span style="color:#008080;font-weight:bold;">"seconda colonna"</span>,<span style="color:#008080;font-weight:bold;">"terza colonna"</span>,<span style="color:#008080;font-weight:bold;">"prima sestina"</span>,<span style="color:#008080;font-weight:bold;">"seconda sestina"</span>,<span style="color:#008080;font-weight:bold;">"terz
a sestina"</span>,<span style="color:#008080;font-weight:bold;">"quarta sestina"</span>,<span style="color:#008080;font-weight:bold;">"quinta sestina"</span>,<span style="color:#008080;font-weight:bold;">"sesta sestina"</span>,\
<span style="color:#008080;font-weight:bold;">"settima sestina"</span>,<span style="color:#008080;font-weight:bold;">"ottava sestina"</span>,<span style="color:#008080;font-weight:bold;">"nona sestina"</span>,<span style="color:#008080;font-weight:bold;">"decima sestina"</span>,<span style="color:#008080;font-weight:bold;">"undicesima sestina"</span>,<span style="color:#008080;font-weight:bold;">"quattro primi"</span>,<span style="color:#008080;font-weight:bold;">"carre 1a5"</span>,<span style="color:#008080;font-weight:bold;">"carre 2a6"</span>,<span style="color:#008080;font-weight:bold;">"carre 4a8"</span>,<span style="color:#008080;font-weight:bold;">"carre 5a9"</span>,<span style="color:#008080;font-weight:bold;">"carre 7a11"</span>,<span style="color:#008080;font-weight:bold;">"carre 8a12"</span>,<span style="color:#008080;font-weight:bold;">"carre 10a14"</span>,<span style="color:#008080;font-weight:bold;">"carre 11a15"</span>,<span style="color:#008080;f
ont-weight:bold;">"carre 13a17"</span>,<span style="color:#008080;font-weight:bold;">"carre 14a18"</span>,<span style="color:#008080;font-weight:bold;">"carre 16a20"</span>,<span style="color:#008080;font-weight:bold;">"carre 17a21"</span>,\
<span style="color:#008080;font-weight:bold;">"carre 19a23"</span>,<span style="color:#008080;font-weight:bold;">"carre 20a24"</span>,<span style="color:#008080;font-weight:bold;">"carre 22a26"</span>,<span style="color:#008080;font-weight:bold;">"carre 23a27"</span>,<span style="color:#008080;font-weight:bold;">"carre 25a29"</span>,<span style="color:#008080;font-weight:bold;">"carre 26a30"</span>,<span style="color:#008080;font-weight:bold;">"carre 28a32"</span>,<span style="color:#008080;font-weight:bold;">"carre 29a33"</span>,<span style="color:#008080;font-weight:bold;">"carre 31a35"</span>,<span style="color:#008080;font-weight:bold;">"carre 32a36"</span>)
<span style="color:#000080;">print</span>(<span style="color:#008080;font-weight:bold;">"Attenzione: stiamo facendo riferimento alle regole della Roulette francese."</span>)
<span style="color:#000080;">print</span>(<span style="color:#008080;font-weight:bold;">"Si presuppone, come previsto ad esempio al Casino' di Venezia, che la puntata minima accettata </span><span style="color:#000080;font-weight:bold;">\n</span><span style="color:#008080;font-weight:bold;">sia di 10 Euro e la massima di 600. Si ritiene scontato, inoltre, che il giocatore</span><span style="color:#000080;font-weight:bold;">\n</span><span style="color:#008080;font-weight:bold;">segua rigorosamente i suggerimenti che verranno evidenziati dal programma."</span>)
<span style="color:#000080;">print</span>()
capitale_disponibile = <span style="color:#000080;">eval</span>(<span style="color:#000080;">input</span>(<span style="color:#008080;font-weight:bold;">"Per cominciare, indicami l'importo che intendi mettere a disposizione per il gioco (si consiglia almeno 2500 Euro)" </span>))
<span style="color:#000080;">print</span>()
inizio_gioco = <span style="color:#0000ff;">0
</span>giocate_effettuate = <span style="color:#0000ff;">0
</span><span style="color:#000080;font-weight:bold;">while </span>inizio_gioco == <span style="color:#0000ff;">0</span>:
<span style="color:#000080;">print</span>(<span style="color:#008080;font-weight:bold;">"A seguire, l'elenco delle puntate possibili considerate da questo programma e l'attuale situazione del gioco:"</span>)
<span style="color:#000080;">print</span>()
<span style="color:#000080;">print</span>(<span style="color:#008080;font-weight:bold;">"Giocata"</span>+((<span style="color:#008080;font-weight:bold;">" "</span>)*<span style="color:#0000ff;">17</span>),<span style="color:#008080;font-weight:bold;">"ritardi di uscita"</span>+((<span style="color:#008080;font-weight:bold;">" "</span>)*<span style="color:#0000ff;">6</span>),<span style="color:#008080;font-weight:bold;">"Giocata"</span>+((<span style="color:#008080;font-weight:bold;">" "</span>)*<span style="color:#0000ff;">17</span>),<span style="color:#008080;font-weight:bold;">"ritardi di uscita"</span>+((<span style="color:#008080;font-weight:bold;">" "</span>)*<span style="color:#0000ff;">8</span>))
<span style="color:#000080;">print</span>(<span style="color:#008080;font-weight:bold;">"</span><span style="color:#000080;font-weight:bold;">\n</span><span style="color:#008080;font-weight:bold;">passe"</span>+((<span style="color:#008080;font-weight:bold;">" "</span>)*<span style="color:#0000ff;">27</span>),uscita_passe,((<span style="color:#008080;font-weight:bold;">" "</span>)*<span style="color:#0000ff;">13</span>),<span style="color:#008080;font-weight:bold;">"manque"</span>+((<span style="color:#008080;font-weight:bold;">" "</span>)*<span style="color:#0000ff;">26</span>),uscita_manque)
<span style="color:#000080;">print</span>()
<span style="color:#000080;font-weight:bold;">if </span><span style="color:#000080;">len</span>(liste_in_ritardo) == <span style="color:#0000ff;">0</span>:
<span style="color:#000080;">print</span>(<span style="color:#008080;font-weight:bold;">"Al momento non ho scommesse da suggerirti: salta la mano e"</span>)
<span style="color:#000080;font-weight:bold;">elif </span><span style="color:#000080;">len</span>(liste_in_ritardo) > <span style="color:#0000ff;">0</span>:
<span style="color:#000080;font-weight:bold;">if </span>uscita_manque >= <span style="color:#0000ff;">8</span>:
<span style="color:#000080;">print</span>(<span style="color:#008080;font-weight:bold;">"I numeri da 1 a 18 (manque) sono in ritardo da"</span>,uscita_manque,<span style="color:#008080;font-weight:bold;">"estrazioni"</span>)
<span style="color:#000080;font-weight:bold;">elif </span>uscita_passe >= <span style="color:#0000ff;">8</span>:
<span style="color:#000080;">print</span>(<span style="color:#008080;font-weight:bold;">"I numeri da 19 a 36 (passe) sono in ritardo da"</span>, uscita_passe,<span style="color:#008080;font-weight:bold;">"estrazioni"</span>)
controllo_numero_uscito = <span style="color:#0000ff;">0
</span><span style="color:#0000ff;"> </span><span style="color:#000080;font-weight:bold;">while </span>controllo_numero_uscito == <span style="color:#0000ff;">0</span>:
numero_uscito = <span style="color:#000080;">eval</span>(<span style="color:#000080;">input</span>(<span style="color:#008080;font-weight:bold;">"indica il numero uscito "</span>))
<span style="color:#000080;">print</span>()
<span style="color:#000080;font-weight:bold;">if </span>numero_uscito <span style="color:#000080;font-weight:bold;">not in </span>tutti_i_numeri:
<span style="color:#000080;">print</span>(<span style="color:#008080;font-weight:bold;">"Devi inserire un numero compreso tra 0 e 36"</span>)
<span style="color:#000080;font-weight:bold;">elif </span>numero_uscito <span style="color:#000080;font-weight:bold;">in </span>tutti_i_numeri:
conferma_numero_uscito = <span style="color:#000080;">input</span>(<span style="color:#008080;font-weight:bold;">"Sei sicuro di aver inserito il numero giusto? si/no "</span>)
<span style="color:#000080;">print</span>()
<span style="color:#000080;font-weight:bold;">if </span>conferma_numero_uscito == <span style="color:#008080;font-weight:bold;">"no"</span>:
<span style="color:#000080;">print</span>()
<span style="color:#000080;font-weight:bold;">elif </span>conferma_numero_uscito == <span style="color:#008080;font-weight:bold;">"si"</span>:
controllo_numero_uscito =+<span style="color:#0000ff;">1
</span><span style="color:#0000ff;"> </span><span style="color:#000080;font-weight:bold;">else</span>:
<span style="color:#000080;">print</span>(<span style="color:#008080;font-weight:bold;">"Per confermare o smentire devi scrivere si o no"</span>)
<span style="color:#000080;font-weight:bold;">if </span>numero_uscito <span style="color:#000080;font-weight:bold;">in </span>passe:
uscita_passe = <span style="color:#0000ff;">0
</span><span style="color:#0000ff;"> </span>uscita_manque =+<span style="color:#0000ff;">1
</span><span style="color:#0000ff;"> </span><span style="color:#000080;">print</span>()
<span style="color:#000080;">print</span>(<span style="color:#008080;font-weight:bold;">"E' appena uscito un numero del gruppo passe,"</span>,)
<span style="color:#000080;font-weight:bold;">if </span>uscita_passe <span style="color:#000080;font-weight:bold;">in </span>liste_in_ritardo:
<span style="color:#000080;font-weight:bold;">del </span>liste_in_ritardo[uscita_passe]
<span style="color:#000080;font-weight:bold;">if </span>uscita_manque == <span style="color:#0000ff;">8</span>:
liste_in_ritardo.append(uscita_manque)
<span style="color:#000080;font-weight:bold;">elif </span>numero_uscito <span style="color:#000080;font-weight:bold;">in </span>manque:
uscita_manque = <span style="color:#0000ff;">0
</span><span style="color:#0000ff;"> </span>uscita_passe =+<span style="color:#0000ff;">1
</span><span style="color:#0000ff;"> </span><span style="color:#000080;">print</span>()
<span style="color:#000080;">print</span>(<span style="color:#008080;font-weight:bold;">"E' appena uscito un numero del gruppo manque,"</span>,)
<span style="color:#000080;font-weight:bold;">if </span>uscita_manque <span style="color:#000080;font-weight:bold;">in </span>liste_in_ritardo:
<span style="color:#000080;font-weight:bold;">del </span>liste_in_ritardo[uscita_manque]
<span style="color:#000080;font-weight:bold;">if </span>uscita_passe == <span style="color:#0000ff;">8</span>:
liste_in_ritardo.append(uscita_passe)
controllo_prosegui_gioco = <span style="color:#0000ff;">0
</span><span style="color:#0000ff;"> </span><span style="color:#000080;font-weight:bold;">while </span>controllo_prosegui_gioco == <span style="color:#0000ff;">0</span>:
prosegui_gioco = <span style="color:#000080;">input</span>(<span style="color:#008080;font-weight:bold;">"Vuoi continuare a giocare? si/no "</span>)
<span style="color:#000080;font-weight:bold;">if </span>prosegui_gioco == <span style="color:#008080;font-weight:bold;">"si"</span>:
<span style="color:#000080;">print</span>()
controllo_prosegui_gioco =+<span style="color:#0000ff;">1
</span><span style="color:#0000ff;"> </span>giocate_effettuate =+<span style="color:#0000ff;">1
</span><span style="color:#0000ff;"> </span><span style="color:#000080;font-weight:bold;">elif </span>prosegui_gioco == <span style="color:#008080;font-weight:bold;">"no"</span>:
inizio_gioco =+<span style="color:#0000ff;">1
</span><span style="color:#0000ff;"> </span><span style="color:#000080;">print </span>(<span style="color:#008080;font-weight:bold;">"Ok, spero tu ti sia divertito; arrivederci"</span>)
controllo_prosegui_gioco =+<span style="color:#0000ff;">1
</span><span style="color:#0000ff;"> </span><span style="color:#000080;font-weight:bold;">else</span>:
<span style="color:#000080;">print</span>(<span style="color:#008080;font-weight:bold;">"Devi rispondere si o no"</span>)
</pre>
</body>
</html>