Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Prompt the user to enter the number of times to repeat the loop
- print("Enter the number of times to repeat the loop:")
- num_repeats = tonumber(read())
- -- Initialize a counter variable
- counter = 0
- -- Start the loop
- while counter < num_repeats do
- turtle.up()
- turtle.dig()
- turtle.down()
- turtle.dig()
- turtle.forward()
- -- Increment the counter variable
- counter = counter + 1
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement