0% found this document useful (0 votes)
6 views3 pages

Revision Worksheet Javascript Database Robotics

The document contains revision questions for JavaScript and robotics, including fill-in-the-blank, programming, error-fixing, matching pairs, and short answer sections. It covers topics such as variable declaration, functions, database keys, and programming structures. Additionally, it addresses the importance of sensors and the differences between variable types in JavaScript.

Uploaded by

AISHWARYAA VIVEK
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views3 pages

Revision Worksheet Javascript Database Robotics

The document contains revision questions for JavaScript and robotics, including fill-in-the-blank, programming, error-fixing, matching pairs, and short answer sections. It covers topics such as variable declaration, functions, database keys, and programming structures. Additionally, it addresses the importance of sensors and the differences between variable types in JavaScript.

Uploaded by

AISHWARYAA VIVEK
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

REVSISON QUESTIONS

A. Fill in the Blanks


1. To declare a variable in JavaScript, we use the keyword ________.

2. The ________ function displays a dialog box with a message and an OK

button.

3. To display output on a webpage using JavaScript, we can use ________.

4. The ________ operator is used to compare both value and type.

5. The syntax to call a function named `greet` is ________.

6. A _______ uniquely identifies each record in a table.

7. A _______ is a field in one table that links to a primary key in another.

8. _______ ensures that changes in one table are reflected in related tables.

9. A _______ database stores all data in a single table.

10. _______ happens when the same data is stored in more than one place.

11. . The statement `import _______` is used to include Hummingbird functions.

12. The part of the HB Controller that receives light input is called a _______.

13. A _______ structure executes instructions in order.

14. The _______ is used to spin wheels or move parts.

15. To repeat an action in robotics, we use a _______.

B. Programming Question
Write a JavaScript program that:

- Prompts the user to enter their name

- Displays a greeting using `document.write`

- Has a button that changes the content of a paragraph with id `message` to "Welcome
[name]!" using `innerHTML`.
C. Fix the Error
```javascript

function greet {

var name = prompt("Enter your name");

document.getElementID("message").innerHTML = "Hello " + name;

```

```python

if distance_sensor.get < 10:

led.set_color(1, 255, 0, 0)

else

led.set_color(1, 0, 0, 0)

D. Match the Pairs

1. `prompt()` A. Measures proximity


2. `confirm()` B. Changes webpage content
dynamically
3. `console.log()` C. Used for decision-making
4. `document.getElementById()` D. Duplicate data across multiple
tables
5. `innerHTML` E. Asks user to confirm an action
6. Primary Key F. Unique identifier for a record
7. Foreign Key G. Controls movement
8. Referential Integrity H. Prevents orphan records in
related tables
9. ER Diagram I. Turns on an LED with specific
color
10. Data Redundancy J. Accesses an element by ID
11. `loop` K. Executes until a condition is
false
12. `if` statement L. Outputs a message to the
console
13. `set_single_color_led()` M. Shows table relationships
14. `get_distance ()` N. Asks for user input
15. `set_motor()` O. Connects to a primary key in
another
E. Short Answer Questions
1. Explain the purpose of a foreign key.
2. What is cascade delete and how does it affect related tables?
3. Define data redundancy & data inconsistency?
4. List three components of the HB Controller and their functions.
5. Explain the difference between sequence, selection, and iteration in robotics
programming.
6. Why are sensors important in robotics?
7. What is the difference between `var`, `let`, and `const` in variable declaration?
8. Explain how `onclick` events work with buttons.
9. List and briefly explain any 3 types of operators in JavaScript.

You might also like