What is it you are trying to achieve?
<Replace all the <> with your answers/code and remove the <>>
I am trying to make the code shorter
What is the problem you are having?
<Answer Here>
The code is repeating a lot of the something
Describe what you have tried to solve this problem
<Answer Here>
I tried to looking it up
Post any relevant code (You may choose to attach the file instead of posting the code if it is too long)
<Answer Here>
Turing: |
if input = "a" then %1
if c (1) not= 1 then % 2
mesg %3
end if %4
if c (1) not= 1 & index (text (random ), input ) = 0 then
striker - = 1
end if
end if
if input = "b" then
if c (2) not= 1 then
mesg
end if
if c (2) not= 1 & index (text (random ), input ) = 0 then
striker - = 1
end if
end if
if input = "c" then
if c (3) not= 1 then
mesg
end if
if c (3) not= 1 & index (text (random ), input ) = 0 then
striker - = 1
end if
end if
if input = "d" then
if c (4) not= 1 then
mesg
end if
if c (4) not= 1 & index (text (random ), input ) = 0 then
striker - = 1
end if
end if
if input = "e" then
if c (5) not= 1 then
mesg
end if
if c (5) not= 1 & index (text (random ), input ) = 0 then
striker - = 1
end if
end if
if input = "f" then
if c (6) not= 1 then
mesg
end if
if c (6) not= 1 & index (text (random ), input ) = 0 then
striker - = 1
end if
end if
if input = "g" then
if c (7) not= 1 then
mesg
end if
if c (7) not= 1 & index (text (random ), input ) = 0 then
striker - = 1
end if
end if
if input = "h" then
if c (8) not= 1 then
mesg
end if
if c (8) not= 1 & index (text (random ), input ) = 0 then
striker - = 1
end if
end if
if input = "i" then
if c (9) not= 1 then
mesg
end if
if c (9) not= 1 & index (text (random ), input ) = 0 then
striker - = 1
end if
end if
if input = "j" then
if c (10) not= 1 then
mesg
end if
if c (10) not= 1 & index (text (random ), input ) = 0 then
striker - = 1
end if
end if
if input = "k" then
if c (11) not= 1 then
mesg
end if
if c (11) not= 1 & index (text (random ), input ) = 0 then
striker - = 1
end if
end if
if input = "l" then
if c (12) not= 1 then
mesg
end if
if c (12) not= 1 & index (text (random ), input ) = 0 then
striker - = 1
end if
end if
if input = "m" then
if c (13) not= 1 then
mesg
end if
if c (13) not= 1 & index (text (random ), input ) = 0 then
striker - = 1
end if
end if
if input = "n" then
if c (14) not= 1 then
mesg
end if
if c (14) not= 1 & index (text (random ), input ) = 0 then
striker - = 1
end if
end if
if input = "o" then
if c (15) not= 1 then
mesg
end if
if c (15) not= 1 & index (text (random ), input ) = 0 then
striker - = 1
end if
end if
if input = "p" then
if c (16) not= 1 then
mesg
end if
if c (16) not= 1 & index (text (random ), input ) = 0 then
striker - = 1
end if
end if
if input = "q" then
if c (17) not= 1 then
mesg
end if
if c (17) not= 1 & index (text (random ), input ) = 0 then
striker - = 1
end if
end if
if input = "r" then
if c (18) not= 1 then
mesg
end if
if c (18) not= 1 & index (text (random ), input ) = 0 then
striker - = 1
end if
end if
if input = "s" then
if c (19) not= 1 then
mesg
end if
if c (19) not= 1 & index (text (random ), input ) = 0 then
striker - = 1
end if
end if
if input = "t" then
if c (20) not= 1 then
mesg
end if
if c (20) not= 1 & index (text (random ), input ) = 0 then
striker - = 1
end if
end if
if input = "u" then
if c (21) not= 1 then
mesg
end if
if c (21) not= 1 & index (text (random ), input ) = 0 then
striker - = 1
end if
end if
if input = "v" then
if c (22) not= 1 then
mesg
end if
if c (22) not= 1 & index (text (random ), input ) = 0 then
striker - = 1
end if
end if
if input = "w" then
if c (23) not= 1 then
mesg
end if
if c (23) not= 1 & index (text (random ), input ) = 0 then
striker - = 1
end if
end if
if input = "x" then
if c (24) not= 1 then
mesg
end if
if c (24) not= 1 & index (text (random ), input ) = 0 then
striker - = 1
end if
end if
if input = "y" then
if c (25) not= 1 then
mesg
end if
if c (25) not= 1 & index (text (random ), input ) = 0 then
striker - = 1
end if
end if
if input = "z" then
if c (26) not= 1 then
mesg
end if
if c (26) not= 1 & index (text (random ), input ) = 0 then
striker - = 1
end if
end if
|
Please specify what version of Turing you are using
4.1.1 |