What are commands?

Commands are instructions that tell something what to do, just like when you ask your friend to pass you a toy.

Imagine you're playing with a robot dog. You say, "Sit!" and the dog sits down. That's a command, it tells the robot dog what action to perform.

Like Giving Instructions to a Friend

When you give someone a command, you’re telling them exactly what to do. It’s like when you tell your brother, “Pass me the ball.” He knows right away what to do because you gave him a clear instruction. That's just like how computers and robots use commands to know what to do.

Commands Can Be Simple or Complex

Some commands are short, like "Jump!" Others can be longer, like "Turn left, then run to the tree." Just like when you give your friend more complicated instructions, like “Grab the red ball and bring it back here,” computers use commands in different ways depending on what they need to do.

Commands help everything from robots to video games understand exactly what you want them to do, one step at a time! Commands are instructions that tell something what to do, just like when you ask your friend to pass you a toy.

Imagine you're playing with a robot dog. You say, "Sit!" and the dog sits down. That's a command, it tells the robot dog what action to perform.

Take the quiz →

Examples

  1. A child asks their parent, 'Can we go to the park?', this is a simple command.
  2. A robot receives the instruction 'Move forward.'
  3. A chef follows the command 'Stir gently.'

Ask a question

See also

Discussion

Recent activity