Advertisement
Guest User

loops

a guest
Jun 24th, 2019
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.28 KB | None | 0 0
  1. local x = 0
  2.  
  3. while x<10 do
  4.   print("x="..x)
  5.   x = x+1
  6.  
  7. end
  8.  
  9. local password = ""
  10. while password ~= "dw20" do
  11.   term.write("ENTER PASSWORD: ")
  12.   password = read()
  13. end
  14. local y = 6
  15.  
  16. while y < 5 do
  17.  
  18. repeat
  19.   print("Y: "..y)
  20. until y > 5
  21.  
  22. print("correct password.")
  23. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement