Creating a simple name reading program

From ComputerCraft Wiki
Revision as of 11:21, 12 July 2012 by 121.79.122.188 (Talk) (Created page with "This Will Be A Tutorial On Making A Program That Will Read A Name. This is the code. print("Enter Your Name:") name = read() print("Hello "..name..", Thats A Cool Na...")

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

This Will Be A Tutorial On Making A Program That Will Read A Name. This is the code.

  print("Enter Your Name:")
  name = read()
  print("Hello "..name..", Thats A Cool Name")

The print is pretty obvious, it puts the text there and starts a new line. Now the 'name = read()' sets 'name' as a variable or in othe words what it reads and calls it. And the last line will print some text and the '"..name.."' uses the variable 'name' and puts it in the print

This Is Another Version For My Door

  textutils.slowPrint("Enter Your Name:")
  name = read()
  print("Okay "..name.." Door's Open")
  rs.setOutput("right",true) -- this can be changed
  sleep(5)
  os.shutdown

Please Do Not Edit This Or Claim To Be Your Own This Belongs To Jadengregory00(minecraft username)