Advertisement
someone3709

An Ai made this code

Jan 3rd, 2023 (edited)
960
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.40 KB | Gaming | 0 0
  1. -- Prompt the user to enter the number of times to repeat the loop
  2. print("Enter the number of times to repeat the loop:")
  3. num_repeats = tonumber(read())
  4.  
  5. -- Initialize a counter variable
  6. counter = 0
  7.  
  8. -- Start the loop
  9. while counter < num_repeats do
  10.   turtle.up()
  11.   turtle.dig()
  12.   turtle.down()
  13.   turtle.dig()
  14.   turtle.forward()
  15.  
  16.   -- Increment the counter variable
  17.   counter = counter + 1
  18. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement