Skip to main content

Featured

Space Explorers Book 7: Answers and Explanations

Memunic Space Explorers › Book 7: Memoon and the Search for Another Home › Answers and Explanations Answers and Explanations Habitable means life could live there; inhabited means life does live there. A world can be habitable and empty, as an unoccupied flat has a roof and water but nobody in it. The Moon has almost no air, so water would boil or freeze, and its gravity is only about one-sixth of Earth’s, too weak to keep air. Accept also: no greenhouse blanket, so it swings between very hot and very cold. Venus. It matches Earth in size and roughly in mass, but its thick carbon dioxide air traps heat, making it hot and crushing. “Twin” is only true for size and weight. A dip of 1 per cent means (planet width divided by star width) squared is 0.01, so the ratio is 0.1: the planet is about a tenth as wide as the star. Repeats at the same gap show the planet is going round the star in 12 days, and rule out a one-time event such as a passing object. A planet shines only by reflected l...

Byte by Byte Book 1: Chapter 7 – Computers Follow Instructions

Byte by Byte › Book 1: Computer Basics › Chapter 7: Computers Follow Instructions

Chapter 7: Computers Follow Instructions

You will learn: why computers need clear instructions, and what commands and programs are.

🌟 The Adventure

A delicious smell floated through the air. The friends had landed outside the Memunic Bakery. But from inside came a loud CRASH!

They peeked in. Flour covered the floor. Eggs were on the ceiling. A tall robot chef named Bop stood in the middle, holding a whole unpeeled banana.

"Bop is my cousin," sighed Bleep. "He's a cooking robot. The Mix-Up erased his recipe instructions. The baker tried to tell him what to do, but look what happened!"

The baker, a round, smiley bear, held up a note. "I only said, Put the eggs in the bowl."

"I DID PUT THE EGGS IN THE BOWL," said Bop in a beepy voice. "I PUT THEM IN WITH THE SHELLS. THEN I THREW THE BOWL UP. NOBODY SAID STOP."

Noodles rolled on the floor laughing. Beautine gasped, "My whiskers! The mess!"

Memoon pushed up her glasses. "Bop isn't being naughty. He's a computer. Computers do exactly what they are told, nothing more and nothing less."

Illustration from Byte by Byte Book 1: Chapter 7 – Computers Follow Instructions

💡 Learn With Memoon

Computers only do what they are told

A computer cannot think for itself. It can't guess what you mean. It does exactly what its instructions say.

  • If the instructions are clear and correct, the computer does the job right.
  • If the instructions are unclear, missing a step, or in the wrong order, the computer makes a mess, just like Bop!

Instructions and commands

An instruction tells someone exactly what to do. One single instruction for a computer is also called a command.

Remember: a set of instructions for a computer is called a program. The people who write programs are called programmers.

What makes a good instruction?

Good instructions are...Example
Clear: say exactly what to do"Crack the egg and pour the inside into the bowl"
Complete: no missing stepsDon't forget "Peel the banana"
In the right order: each step at the right timeMix first, then bake
Simple: one small action at a time"Pick up the spoon" not "Make the cake"

Why computers need this

When you tell a friend, "Make me a sandwich," your friend already knows how. A computer doesn't know anything until someone writes every step for it. That's why programmers think very carefully about each instruction.

💡 Memoon's tip: When a computer does something strange, it is usually because of the instructions it was given. The computer isn't being silly; the instructions need fixing!

Illustration from Byte by Byte Book 1: Chapter 7 – Computers Follow Instructions

✍️ Try It Yourself

Activity 1: The Robot Game (No computer needed)

Ask a grown-up to pretend to be a robot. You are the programmer! Give the robot instructions to do a simple job, like putting on a cap.

The robot must do exactly what you say, and nothing else. If you say, "Put on the cap," but the cap is on the table, the robot might put it on upside down! Keep fixing your instructions until the robot gets it right.

Activity 2: Funny or right? (No computer needed)

Read each instruction. What could a robot do wrong? Make each one clearer.

  1. "Put on your shoes." (On which feet? Socks first?)
  2. "Pour the milk." (Into what? How much?)
  3. "Brush your teeth." (Did you put toothpaste on the brush?)

Activity 3: Clear instructions for a friend (No computer needed)

Draw a simple shape, like a house made of a square and a triangle. Hide it. Tell a friend how to draw it, step by step, without showing them. Compare the two drawings. Were your instructions clear?

🎉 Memoon Solves It

Memoon picked up a pencil. "Let's write clear instructions for Bop. One small step at a time, in the right order."

Kachui helped, because Kachui loved steps. Together they wrote:

  1. Pick up one egg.
  2. Tap the egg gently on the edge of the bowl.
  3. Open the shell and pour the inside into the bowl.
  4. Put the shell in the bin.
  5. Peel the banana.
  6. Put the banana in the bowl.
  7. Mix with the spoon ten times.
  8. Stop.

Bop read the list. "FOLLOWING INSTRUCTIONS." Tap, crack, pour. Shell in the bin. Peel, plop. Mix, mix, mix... ten times. "STOPPING."

The bowl was full of perfect batter. Bop's eyes turned into two happy hearts. "THANK YOU, MEMOON. CLEAR INSTRUCTIONS MAKE ME A GOOD ROBOT."

The baker bear baked banana muffins for everyone. Noodles ate two. Beautine saved hers in her cheek for later.

❓ Check Your Knowledge

A. Fill in the blanks

  1. Computers do what they are told.
  2. One instruction for a computer is called a .
  1. People who write programs are called .

B. True or False

  1. A computer can guess what you mean.
  2. If a step is missing, the computer may make a mistake.
  3. Good instructions are clear and in the right order.
  4. When a computer does something strange, the instructions may need fixing.

C. Which is the better instruction for a robot?

  1. (a) "Get ready for school." (b) "Put your books in your bag."
  2. (a) "Draw a circle in the middle of the page." (b) "Draw something nice."

D. Challenge: Write three clear steps to tell a robot how to wash its hands.

📚 Word Bank

  • Instruction: words that tell someone exactly what to do.
  • Command: one instruction given to a computer.
  • Program: a set of instructions for a computer.
  • Programmer: a person who writes programs.
  • Robot: a machine controlled by a computer that can move and do jobs.

Keep learning with Byte by Byte

Explore Book 1: Computer Basics. Find the ebook, purchase details and teaching slides on MemuniCity.

Watch this chapter on YouTube

Comments

Popular posts from this blog

CA-7 Job Status and Failure Reason Codes

Here are the various status codes that You may see for jobs in the Queue or Logs in CA-7. R-C0002 R-C0003 R-C0099 R-C0255 R-JCLER A-U0002 A-U0004 A-U0015 A-U0043 A-U4095 A-SOC7 A-U4000 Reason Code/Job Status Code explanation: The indication of the job's current disposition. Values and their meanings are: A-Snnnn-- The job has failed with a system abend. A-Unnnn --The job has failed with a user abend. C-Cnnnn --The job has completed successfully and is going through completion processing. E-ARFATT-- An error occurred during the attempt to attach ARF definitions. This can result if the ARFSET specified is not defined. A diagnostic message may have been written to the CA-7 log, the OS console, or to the trailer queue for the job (in which case it can be displayed using LQ,JOB=x,LIST=ALL). E-ARFERR ---The job encountered an error in the ARF processing. Do a LARFQ command for the job to get more specific information. E-SEGERR --The job has been requeued...

Whistling Winds and Waterfalls: 4 Days of Magic in Shillong

Nestled in the clouds, where the scent of pine trees mingles with the rhythm of waterfalls and the tunes of local guitar-strumming youth—Shillong is more than a place. It’s a vibe. If you’ve got 3 nights and 4 days, you’ve got just enough time to fall in love. Here’s how to make the most of it—food, fun, fog and fantastic views included. Day 1: Shillong, We’re Coming for You! You land in Guwahati, barely out of the airport when the hills start calling. You hop into your cab, Spotify on, windows down, and the three-hour ride to Shillong begins. Just when you think it can’t get better, you stop at Umiam Lake —a lake so calm, it looks like someone ironed the water. By evening, you’re sipping hot chai in Laitumkhrah, maybe nibbling on spicy momos or pork jadoh from a roadside stall. You’re checked into your charming hotel ( Tripura Castle if you fancy old-world royalty, Ri Kynjai if you’re into lakeside poetry). The breeze whispers secrets of waterfalls and pine forests. Sleep well, drea...

Installing and Configuring Hadoop on Ubuntu as a Pseudo Distributed Single Node Cluster

Briefly what is psuedo-distributed single node Hadoop cluster: It is a Hadoop distributed cluster having Single Node. All the five daemons (NN,DN,JT,TT,SNN) are running as individual JVM (java process) instances. We will get all distributed features of Hadoop. This mode is used to develop, test, and staging (before production) Map Reduce programs quickly. It writes all the system, daemon and user logs to different files on the cluster To install Hadoop in this mode, we have to modify the hadoop-env.sh, core-site.xml, hdfs-site.xml, mapred-site.xml. hadoop-env.sh contains all the Environment variables which are required for running Hadoop. All the default values are fine, Only we have to modify the JAVA_HOME=“The location of Java Home Directory” Core-site.xml contains all the cluster specific information like io, temp directory, sorting, file system uri etc. Hdfs-site.xml contains all the parameters which are specific to HDFS like name node directory, data node directory...