Imagine you want to tell a robot how to make a sandwich. Which of these best describes what a programming language does?
Think about how you explain steps to someone who doesn't understand your language.
A programming language is designed to let humans write instructions that computers can understand and follow, like telling a robot how to make a sandwich step-by-step.
Look at the flowchart below that shows steps in a programming language. What is the final output?
Flowchart steps:
1. Start
2. Set x = 3
3. Set y = x + 2
4. Print y
5. End
Follow the steps one by one and calculate the value of y.
Starting with x=3, y is set to x+2, which is 3+2=5. Then y is printed, so the output is 5.
Which analogy best explains the difference between a programming language and a human language?
Think about how computers need exact instructions versus how people talk.
Programming languages require precise, step-by-step instructions like a recipe, while human languages allow for flexible and varied meanings like conversations.
Which of the following is NOT a feature of a programming language?
Consider if programming languages are naturally understood by everyone.
Programming languages require learning; they are not naturally understood by humans without study.
You want to create a simple website that shows your favorite recipes. Which programming language would you use to write the structure and content of the website?
Think about which language is used to build the parts of a webpage you see.
HTML is the language used to create the structure and content of web pages, making it the right choice for a simple website.