Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Turing Help Fast
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Ashwin Kumar




PostPosted: Sun Oct 22, 2017 12:32 pm   Post subject: Turing Help Fast

What is it you are trying to achieve?
Suppose we want to simulate a game. Consider that you roll three 10-sided dice. If you get all 3 seven,
then you win big. You want to repeat this game 1000 times. Code below:

What changes should you make to show how many times you won big?

What is the problem you are having?
Not able to understand


Describe what you have tried to solve this problem
Not able to understand


Turing:


var num1, num2, num3 : int
for play_count : 1 .. 1000
randint (num1, 1, 9)
randint (num2, 1, 9)
randint (num3, 1, 9)
put num1, " " , num2, " ", num3
if num1 = num2 and num2 = num3 and num3 =7 then
delay (1000)
cls
locate (12,20)
randint(color_number,0,255)
color (color_number)
put " YOU WON BIG"
delay (1000)
end if
end for
put " End of program"



Please specify what version of Turing you are using
<4.1.1a>
Sponsor
Sponsor
Sponsor
sponsor
Insectoid




PostPosted: Sun Oct 22, 2017 9:44 pm   Post subject: RE:Turing Help Fast

What part are you having trouble with?
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 2 Posts ]
Jump to:   


Style:  
Search: