Cấp độ: beginner20 phútminMiễn phíFreeCreative ExplorerCreative Explorer

Máy tính nghĩ như thế nào?How does a computer think?

Bản đồ thuật toán làm sandwichA sandwich-making algorithm map

Bạn sẽ học gìWhat you will learn

  • Hiểu máy tính thực hiện lệnh theo thứ tựUnderstand computers follow commands in order
  • Nhận biết algorithm trong cuộc sốngRecognize algorithms in daily life
  • Biết từ: command, step, order, algorithmKnow words: command, step, order, algorithm

Bạn sẽ tạo gìWhat you will build

Bản đồ thuật toán làm sandwichA sandwich-making algorithm map

Nội dung bài họcLesson content

Máy tính là gì?What is a computer?

Máy tính là một cỗ máy nhận lệnh từ con người và thực hiện theo đúng thứ tự. Khi bạn nhấn nút, gõ phím, hay chạm màn hình — bạn đang ra lệnh cho máy tính. Máy tính không tự biết làm gì, nó chỉ làm đúng những gì bạn bảo nó làm.A computer is a machine that receives commands from humans and executes them in order. When you press a button, type, or touch the screen — you are giving commands to the computer. The computer does not know what to do on its own; it only does exactly what you tell it to do.

Thuật toán là gì?What is an algorithm?

Thuật toán (algorithm) là một tập hợp các bước theo thứ tự để giải quyết một vấn đề. Ví dụ: công thức làm sandwich là một thuật toán — bạn làm theo từng bước: (1) lấy bánh mì, (2) phết bơ, (3) thêm phô mai, (4) ăn. Nếu đổi thứ tự bước, kết quả sẽ khác.An algorithm is a set of ordered steps to solve a problem. For example, a sandwich recipe is an algorithm — you follow each step: (1) get bread, (2) spread butter, (3) add cheese, (4) eat. If you change the order, the result will be different.

Tại sao thứ tự quan trọng?Why does order matter?

Máy tính làm việc theo thứ tự từ trên xuống dưới, từ trái sang phải. Nếu bạn bảo máy tính "ăn sandwich trước khi làm sandwich", nó sẽ không hiểu vì chưa có sandwich để ăn. Thứ tự đúng là: làm trước, ăn sau.Computers work in order from top to bottom, left to right. If you tell the computer "eat the sandwich before making it", it will not understand because there is no sandwich to eat yet. The correct order is: make first, eat later.

Trò chơi: Làm sandwich bằng lệnhGame: Make a sandwich with commands

Hãy tưởng tượng bạn là đầu bếp và bạn đang viết lệnh cho một robot làm sandwich. Viết 5 bước theo đúng thứ tự để robot có thể làm được một chiếc sandwich phô mai. Mỗi bước phải rõ ràng, không bị bỏ sót.Imagine you are a chef writing commands for a robot to make a sandwich. Write 5 steps in the correct order so the robot can make a cheese sandwich. Each step must be clear and not skipped.

Bài tập thực hànhHands-on exercises

1Viết thuật toán 5 bước để đánh răng buổi sáng.Write a 5-step algorithm for brushing teeth in the morning.

Gợi ýHint

Bắt đầu bằng: lấy bàn chải, lấy kem...Start with: get toothbrush, get toothpaste...

Lời giảiSolution
text
                      
                        1. Lấy bàn chải đánh răng
2. Bóp kem lên bàn chải
3. Chải răng trong 2 phút
4. Súc miệng bằng nước
5. Rửa bàn chải và cất đi
                      
                    

2Đổi thứ tự các bước làm sandwich và xem điều gì xảy ra. Viết ra kết quả.Reorder the sandwich steps and see what happens. Write the result.

Gợi ýHint

Thử đặt "ăn sandwich" ở bước số 1.Try putting "eat sandwich" as step 1.

Lời giảiSolution
text
                      
                        Nếu đặt "ăn sandwich" trước "làm sandwich", robot sẽ không có gì để ăn vì sandwich chưa được làm. Thuật toán sai → kết quả sai.
                      
                    

Kiểm traQuiz

Chọn đáp án đúng cho mỗi câu. Nhấn để xem giải thích.Choose the correct answer for each question. Click to see explanation.

Câu 1: Thuật toán là gì?Q1: What is an algorithm?

Câu 2: Tại sao thứ tự các bước trong thuật toán quan trọng?Q2: Why is the order of steps in an algorithm important?

Câu 3: Khi bạn nhấn nút trên máy tính, bạn đang làm gì?Q3: When you press a button on a computer, what are you doing?