GithubHelp home page GithubHelp logo

es 5.44 about cai HOT 17 CLOSED

teocoluccio avatar teocoluccio commented on August 18, 2024
es 5.44

from cai.

Comments (17)

FabioZTessitore avatar FabioZTessitore commented on August 18, 2024

lo vedi che il codice nei vari casi è lo stesso?

from cai.

TeoColuccio avatar TeoColuccio commented on August 18, 2024

Si cambia solo l'estrazione

from cai.

FabioZTessitore avatar FabioZTessitore commented on August 18, 2024

appunto. E ti sembra il caso di scrivere tre volte lo stesso codice?

from cai.

TeoColuccio avatar TeoColuccio commented on August 18, 2024

Ovviamente no, faccio una funzione... (Dopo pranzo..)

from cai.

FabioZTessitore avatar FabioZTessitore commented on August 18, 2024

puoi mettere nell'if solo l'estrazione dei numeri

from cai.

TeoColuccio avatar TeoColuccio commented on August 18, 2024

Non riesco a gestire la variabile esatte. Così come ho fatto la passa azzerata ogni volta. Magari se usassi il passaggio per riferimento...

from cai.

FabioZTessitore avatar FabioZTessitore commented on August 18, 2024

hai avuto l'intuizione di fare return esatte, devi solo proseguire ...esatte = cai_play(a, b, esatte)

from cai.

TeoColuccio avatar TeoColuccio commented on August 18, 2024

Ah già.. Però ora per fare le opzioni è un casino

from cai.

FabioZTessitore avatar FabioZTessitore commented on August 18, 2024

devi trovare una soluzione ... haha

ps. continui a fare tre volte lo stesso codice nel main. Ti avevo detto di fare l'if solo per l'estrazione dei numeri, poi il resto resta uguale

from cai.

TeoColuccio avatar TeoColuccio commented on August 18, 2024

E che ci sta in più? Il while?

from cai.

FabioZTessitore avatar FabioZTessitore commented on August 18, 2024

Livello 1

if livello == 1:
    while conta < 10:
        a = cai_extract()
        b = cai_extract()
        cai_play(a, b, esatte)
        conta += 1

Livello 2

elif livello == 2:
    while conta < 10:
        a = cai_extract_livello_2()
        b = cai_extract_livello_2()
        cai_play(a, b, esatte)
        conta += 1

Livello 3

elif livello == 3:
    while conta < 10:
        a = cai_extract_livello_3()
        b = cai_extract_livello_3()
        cai_play(a, b, esatte)
        conta += 1

Trova le differenze haha

from cai.

TeoColuccio avatar TeoColuccio commented on August 18, 2024

Cambia solo l'estrazione, ma il ciclo lo devo rimanere per forza..

from cai.

TeoColuccio avatar TeoColuccio commented on August 18, 2024

Prof e mo l'ultima scelta dell'opzione?

from cai.

FabioZTessitore avatar FabioZTessitore commented on August 18, 2024

Hai la soluzione già fatta e non la vedi

Il venerdì 4 novembre 2016, Teodoro [email protected] ha scritto:

Prof e mo l'ultima scelta dell'opzione?


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#13 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/AC3PUmi6ud1rglxwoyc_ZECLNaA-xzq4ks5q65lhgaJpZM4Kk7Mp
.

from cai.

TeoColuccio avatar TeoColuccio commented on August 18, 2024

Posso usare una chiamata ricorsiva?

from cai.

TeoColuccio avatar TeoColuccio commented on August 18, 2024

No perchè quando la funzione muore, con essa se ne va la variabile "risposta" e quindi non posso controllare l'esito..

from cai.

FabioZTessitore avatar FabioZTessitore commented on August 18, 2024

Sarebbe bello se usassi una chiamata ricorsiva

Il venerdì 4 novembre 2016, Teodoro [email protected] ha scritto:

No perchè quando la funzione muore, con essa se ne va la variabile
"risposta" e quindi non posso controllare l'esito..


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#13 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/AC3PUjtkgSmel3Zftj0667OuxzEAEla9ks5q67jtgaJpZM4Kk7Mp
.

from cai.

Related Issues (13)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.