
-----------------------------------
Michael516
Wed Mar 05, 2008 12:38 pm

First turing program
-----------------------------------
I started turing about a month ago and this is my first biger than 1kb turing program, it is a trivia game.  there are five questions, some are trick questions so watch out.

-----------------------------------
Tony
Wed Mar 05, 2008 1:21 pm

RE:First turing program
-----------------------------------
this is quite good for a month of Turing -- it, by far, beats a lot of end of term "projects" that attempt to code trivia games. Good job.

something I found weird though

if answer1 = "a" or answer1 = "b" or answer1 = "c" or answer1 = "d" then
    ...
elsif answer1 = "e" then
    ...
end if

One problem is that if I enter anything else (such as "q"), I get no response what so ever. And really, typing out all of those "or answer = ..." is just annoying.

if answer1 = "e" then
   ...
else
   ...
end if


also, this is neat. Instead of if answer1 = "a" or answer1 = "b" or answer1 = "c" or answer1 = "d" then you could use

if answer1 >= "a" and answer1 