What is a variable in programming?
A variable is a container that holds data that can change, like a box that you can put different things in.
What is syntax in programming?
Answer: Syntax refers to the rules for writing code correctly in a programming language.
What is Python?
Answer: Python is a high-level programming language that is easy to read and write.
What is machine language?
Answer: Machine language is the lowest level of programming language, consisting of binary code (ones and zeros) that computers can understand directly.
What is a compiled language?
Answer: A compiled language is a programming language whose code is translated into machine language before it is run.
Give an example of a variable name you could use in a program.
Answer: "score" or "age".
Why is it important to follow syntax rules when coding?
Answer: Following syntax rules ensures the code runs correctly and the computer understands what to do.
What is one thing you can do with Python?
Answer: You can create games, websites, or analyze data.
Why is machine language difficult for humans to use?
Answer: Because it uses binary code, which is hard to read compared to letters and numbers.
Name one example of a compiled language.
Answer: C++ or Java.
What do we call values that never change in a program?
Answer: Constants.
What happens if you make a syntax error in your code?
Answer: The program will not run or will crash because the computer cannot understand the incorrect instructions.
Why do many beginners like to learn Python?
Answer: Because its syntax is simple and easy to understand.
What do computers use machine language for?
Answer: To execute instructions and perform tasks.
What is the benefit of using a compiled language?
Answer: Compiled programs run faster and can use more system resources.
How do you assign a value to a variable in Python?
Answer: You use the equals sign, like this: variable_name = value.
Can syntax rules be different in different programming languages?
Answer: Yes, each programming language has its own syntax rules.
What does the command print("Hello World") do in Python?
Answer: It displays the text "Hello World" on the screen.
Can programmers write programs directly in machine language?
What is the process called when you turn code into machine language?
Answer: Compiling.
What is the purpose of using variables in a program?
Answer: They help store information that can be used and changed throughout the program.
Give an example of a simple syntax error.
Answer: Forgetting to close a parenthesis, like in print("Hello World".
How do you create a variable in Python?
Answer: By using the equals sign, like this: my_variable = 10.
How does machine language differ from programming languages like Python?
Answer: Machine language is made of binary code, while programming languages use syntax that is easier for humans to read and write.
What is a downside of compiled languages?
Answer: You need to compile the code each time you make changes before running it again.