fork download
  1. -- your code goes here
  2. person1 = {
  3. name = "bob" ,
  4. age = 70 ,
  5. hair = "black" ,
  6. };
  7. person2 = {
  8. name = "dan",
  9. age = 40 ,
  10. hair = "blonde" ,
  11. };
  12. describe = function(parent)
  13. parent = _G[parent]
  14. print ( "hello " .. parent.name .. " your are " .. parent.age .. " years old and your hair color is " .. parent.hair )
  15. end
  16. print ("who are you") ;
  17. answer = io.read ();
  18. describe (answer)
Success #stdin #stdout 0s 2792KB
stdin
person1
stdout
who are you
hello bob your are 70 years old and your hair color is black