
-----------------------------------
jadelinanne
Tue Dec 11, 2012 5:48 pm

Beginner turing help (counters)
-----------------------------------
What is it you are trying to achieve?







Please specify what version of Turing you are using


-----------------------------------
Panphobia
Tue Dec 11, 2012 5:54 pm

RE:Beginner turing help (counters)
-----------------------------------
show the code, you probably need an if

-----------------------------------
jadelinanne
Tue Dec 11, 2012 6:07 pm

RE:Beginner turing help (counters)
-----------------------------------
This is what I have so far

loop
    startingAmount := startingAmount - 3
    put "What do you think the first number is?"
    get input1
    put " "
    put "What do you think the second number is?"
    get input2
    put " "
    put "what do you think the third number is?"
    get input3
    put " "
    count := count + 3
    if input1= gen1 and input2 = gen2 and input3 = gen3 then
        startingAmount := Amount + 15
        put
            "Congrats! You got them all right!"
        put "Winning: 15 dollars"
        put "Balance:", startingAmount, "dollars"

        exit when input1 = gen1 and input2 = gen2 and input3 = gen3 or startingCash = 0

    elsif input1 = generate1 and guess2 = gen2 then
        startingCash :=  startingAmount + 3
        put "You got two numbers correct"
        put "Winning:3 dollars"
        put "Balance:",  startingAmount, "dollars"
    elsif input1 = gen1 and guess3 = gen3 then
         startingAmount :=  startingAmount + 3
        put "You got two numbers correct"
           put "You got two numbers correct"
        put "Winning:3 dollars"
        put "Balance: ",  startingAmount, "dollars"
    elsif guess2 = gen2 and guess3 = gen3 then
         startingAmount :=  startingAmount + 3
        put "You got two numbers correct"
           put "You got two numbers correct"
        put "Winning:3 dollars"
        put "Balance: ", startingCash, "dollars"
    elsif input1 = gen1 then
         startingAmount :=  startingAmount + 2
        put "You got one number correct"
    elsif guess2 = gen2 then
        st startingAmount :=  startingAmount + 2
        put "You got one number correct"
    elsif guess3 = gen3 then
         startingAmount :=  startingAmount + 2

        put "You got one number correct"



        put "You got it in", count, "guesses"
    end if
end loop

-----------------------------------
Panphobia
Tue Dec 11, 2012 6:12 pm

Re: Beginner turing help (counters)
-----------------------------------
I am not going to code it for you but you should consider totally scrapping your code and make it input a starting amount then, make a counter that represents the question you are on, and then check if the number is equal to one of the three numbers, if it is add 1 to wins and take the number out of being checked, and then repeat until startamount := 0 or wins = 3 and then at the end just make an if, if wins = 1 then.... elsif wins =2, oh ya and after every input just do startAmount -=1

-----------------------------------
jadelinanne
Tue Dec 11, 2012 6:17 pm

RE:Beginner turing help (counters)
-----------------------------------
How do I get the number out of being checked?

-----------------------------------
Panphobia
Tue Dec 11, 2012 6:19 pm

RE:Beginner turing help (counters)
-----------------------------------
figure it out :D

-----------------------------------
jadelinanne
Tue Dec 11, 2012 6:31 pm

RE:Beginner turing help (counters)
-----------------------------------
THANK YOU! ;D!
