Building Robots with TJBot Quiz Answers

Get All Module Building Robots with TJBot Quiz Answers

Learn how to program a simple robot (TJBot) to move its arm, recognize objects, flash a light, speak, and more. You can build simple apps to control TJBot by using Node.js or even Node-RED. If you don’t want to purchase the TJBot, you use a simulator instead.

This course is for all those do-it-yourself Node.js or Node-RED programmers who want to learn IoT basics. You can purchase the TJBot if you don’t already have one or run it in a simulator, so no purchase necessary! You’ll use artificial intelligence services (Watson) to program the robot to recognize objects and color, translate speech to text, recognize and translate languages, and analyze emotional tones in text. You should have basic programming experience with either Node.js or Node-RED. Experience with programming IoT devices is not required.

You must have a Pay-As-You-Go or subscription IBM Cloud account. For this course, you can program the physical TJBot or use a simulator that will mimic the actions, speech, and sounds of the robot. If you use the simulator, you need only a web browser. If you want to use the physical robot, you can create the same project files on the Raspberry Pi and run the Node.js application. TJBot can be programmed in Node-RED, Swift, Python, and Node.js.

This course will use a Node.js simulator that mirrors the real bot to make it accessible to everyone. This code can be copied over to the Raspberry Pi and run as-is with little modification.

Enroll on Cognitive Class

Quick labs

Question: What does the see method return? Select all that apply.

  • Names of objects
  • Names of colors
  • Names of people
  • An image taken with the camera

Question: Which of these statements are true about TJBot? Select all that apply.

  • TJBot is a product sold by IBM.
  • TJBot is an open source project.
  • TJBot is powered by artificial intelligence.
  • TJBot has a community of contributors who contribute recipes.

Question: What programming languages are supported by the TJBot libraries mentioned in this course? Select all that apply.

  • Node.js
  • Node-RED
  • Swift
  • Python

Question: Which one of these Watson services does not have a corresponding method in the TJBot library.

  • Speech to Text
  • Language Translator
  • Discovery
  • Text to Speech
  • Visual Recognition
  • Watson Assistant
  • Tone Analyzer

Question: Which method can be passed a duration value to specify how long the LED light should stay on?

  • shine
  • blink
  • pulse
  • turnOn

Complex labs

Question: In which order do these methods described in the course make the most logical sense?

  • isTranslatable, identifyLanguage, translate
  • translate, identifyLanguage, isTranslatable
  • identifyLanguage, isTranslatable, translate
  • isTranslatable, translate, identifyLanguage

Question: Review the following Node.js code. What does the value of the variable response contain?

var TJBot = require("tjbot");

var tj = new TJBot(  
  ["camera"],  
  {},  
  { 
     visual_recognition: {
       apikey: ""    
     }
  });

tj.see(function(response) {  
  console.log(response);
});
  • Names of people
  • An array of objects containing names of objects and colors seen by the TJBot camera
  • An image captured by TJBot
  • Faces of people

Question: Which number points in the following Node.js code (#1, #2, #3, #4) should be corrected so that TJBot can say “Hello World” in English? Select all that apply.

var TJBot = require("tjbot");
    
var tj = new TJBot(  
  ["microphone"],  // #1
  {
    robot: {
      gender: "female" // #2
    },
    speak: {
      language: "fr-FR" // #3
    }
  },
  {
    text_to_speech: { // #4
      username: "cf63b1f3-ef18-4628-86c8-6b1871e076b9",         
      password: "MWNwz3qcdIab"
    }
  });
    
tj.speak("Hello World");
  • #1
  • #2
  • #3
  • #4

Question: Review the following Node.js code. Which number points (#1, #2, #3, #4) in the following code should be corrected to make TJBot take a picture and speak out what is seen? Select all that apply.

var TJBot = require("tjbot");
    
var tj = new TJBot(  
  ["speaker"],  // #1
  {
    robot: {
      gender: "female" // #2
    },
    speak: {
      language: "en-US" // #3
    }
  },
  { // #4
    text_to_speech: {
      username: "cf63b1f3-ef18-4628-86c8-6b1871e076b9",         
      password: "MWNwz3qcdIab"
    }
  });

tj.see(function(response) { 
  tj.speak("I see "+response.map(i => i.class).join(", "));
});  
  
  • #1
  • #2
  • #3
  • #4

Question: Which of the following blocks will speak out the phrase “Hello World” followed by pulsing the LED light the color green?

CODE BLOCK 1:

tj.speak("hello world").then(function() {
  tj.pulse("green", 1);
});

CODE BLOCK 2:

tj.speak("hello world");
tj.pulse("green", 1);
  

CODE BLOCK 3:

tj.speak("hello world").then(function() {
tj.pulse(1, "green");
});

CODE BLOCK 4:

tj.pulse("green", 1);
tj.speak("hello world");
  • CODE BLOCK 1
  • CODE BLOCK 2
  • CODE BLOCK 3
  • CODE BLOCK 4

Final Exam

Question: What is the best way to determine whether a model is available in the Watson Language Translator service?

  • Use the translate method
  • Use the isTranslatable method
  • Check the Watson Language Translator documentation

Question: The TJBot capabilities can be extended both physically and in code by using third-party libraries or by writing custom code.

  • True
  • False

Question: The converse method can be used to do which tasks? Select all that apply.

  • Parse and process natural language
  • Have TJBot respond by voice
  • Provide a response to a user’s natural language input
  • Extract intents and entities trained in Watson Assistant

Question: TJBot can recognize the verbal emotions by using the method analyzeTone.

  • True
  • False

Question: Which methods can be chained together with the converse method? Select all that apply.

  • listen
  • speak
  • translate
  • analyzeTone

Question: What is the correct order of the following three arguments that are passed to the TJBot constructor?

1. Hardware, a JavaScript array of strings, i.e. speaker, microphone, camera

2. A JavaScript object with Watson service credentials

3. A JavaScript object with configuration settings like the language to speak

  • #1 #3 #2
  • #1 #2 #3
  • #3 #2 #1
  • #2 #1 #3

Question: Jane wrote this code in Node.js, but the code is not working as expected. Which number points in the code identify the code that should be corrected? Select all that apply.

var TJBot = require("tjbot");

var tj = new TJBot(  
  ["speaker"],  // #1
  {
    listen: {
      language: "en-US" // #2   
    }
  },  
  { 
    speech_to_text: {
      username: "",  // #3   
      password: "" // #4
    }
  });

tj.listen(function(text) {  
  console.log(text);  
});

tj.stopListening(); // #5  
  
  • #1
  • #2
  • #3
  • #4
  • #5

Question: Select all the core hardware that is supported by TJBot by default.

  • Raspberry Pi
  • Microphone
  • Thermometer
  • Speaker
  • Camera
  • LED light
  • Servo

Question: What is the variable workspaceId used for in the following code?

var TJBot = require("tjbot");

var tj = new TJBot(
  ["microphone","speaker"],
  {
    robot: {
      gender: "male"
    },
    speak: {
      language: "en-US"
    }
  },
  {
    speech_to_text: {
      username: "",
      password: ""
    },
    conversation: {
      username: "",
      password: ""
    },
    text_to_speech: {
      username: "cf63b1f3-ef18-4628-86c8-6b1871e076b9",
      password: "MWNwz3qcdIab"
    }    
  }
);

var workspaceId = "";

function processText(text) {
  console.log(text);
  tj.stopListening();

  tj.converse(workspaceId, text, response => {
    console.log(response);

    tj.speak(response.object.output.text.join(" ")).then(function(){ 
      tj.listen(processText);
    });
  });
}

tj.listen(processText); 
  
  • It segregates multiple user’s conversations with TJBot.
  • It references a specific Watson Assistant service instance workspace that processes the natural language input
  • It is an identifier that is used to continue the interaction with a single user over multiple calls

Question: Review the following code. Then, review the code blocks. Select the code block number that you must change to add in the placeholder labeled TODO to complete this program?

var TJBot = require("tjbot");

var tj = new TJBot(
  ["camera","speaker"], 
  {
    robot: {
      gender: "male" 
    },
    speak: {
      language: "en-US"
    }
  }, 
  {
    // TODO: answer the question
    text_to_speech: {
      username: "",
      password: ""
    }
  });
    
tj.see(function(objects) {
  console.log(objects);
  
  var text = "T J Bot sees " + objects.map(item => item["class"]).join(", ");
  console.log(text);
  
  tj.speak(text);
});    

CODE BLOCK 1

visual_recognition: {
  username: "",
  password: ""
},

  

CODE BLOCK 2

visual_recognition: {
  apikey: ""
},
  

CODE BLOCK 3

No code changes are required. This program will run correctly without any changes.
  
  • CODE BLOCK 1
  • CODE BLOCK 2
  • CODE BLOCK 3

Conclusion:

We hope you know the correct answers to Building Robots with TJBot If Queslers helped you to find out the correct answers then make sure to bookmark our site for more Course Quiz Answers.

If the options are not the same then make sure to let us know by leaving it in the comments below.

Course Review:

In our experience, we suggest you enroll in this and gain some new skills from Professionals completely free and we assure you will be worth it.

This course is available on Cognitive Class for free, if you are stuck anywhere between quiz or graded assessment quiz, just visit Queslers to get all Quiz Answers and Coding Solutions.

More Courses Quiz Answers >>

Building Cloud Native and Multicloud Applications Quiz Answers

Accelerating Deep Learning with GPUs Quiz Answers

Blockchain Essentials Cognitive Class Quiz Answers

Deep Learning Fundamentals Cognitive Class Quiz Answers

Hadoop 101 Cognitive Class Answers

Machine Learning With R Cognitive Class Answers

Machine Learning with Python Cognitive Class Answers

Leave a Reply

Your email address will not be published.