Skip to content

Chapter 1 :Programming for Everybody (Getting Started with Python) (Python for Everybody Specialization) Answers 2025

Question 1

When Python is running in interactive mode and displaying >>>, what is it asking you?
βœ… What would you like to do?
❌ What is your favourite color?
❌ What Python script would you like me to run?
❌ What is the next machine language instruction to run?

🧠 Explanation:
The >>> prompt means the Python interpreter is waiting for your next command β€” it’s asking β€œWhat would you like to do?”


Question 2

What will the following program print out?

x = 15
x = x + 5
print(x)

βœ… 20
❌ 5
❌ 15
❌ “print x”
❌ x + 5

🧠 Explanation:
The variable x starts at 15, adds 5, becomes 20, and print(x) displays 20.


Question 3

Python scripts (files) have names that end with:
βœ… .py
❌ .doc
❌ .png
❌ .exe

🧠 Explanation:
Python files always use the .py extension (e.g., program.py).


Question 4

Which of these words is a reserved word in Python?
βœ… for
❌ names
❌ pizza
❌ payroll

🧠 Explanation:
Reserved words (keywords) like for, if, while, etc., have special meanings in Python and can’t be used as variable names.


Question 5

What is the proper way to say β€œgood-bye” to Python?
βœ… quit()
❌ #EXIT
❌ while
❌ // stop

🧠 Explanation:
You exit the Python interactive shell using quit() or exit().


Question 6

Which part of a computer actually executes the program instructions?
βœ… Central Processing Unit (CPU)
❌ Secondary Memory
❌ Input/Output Devices
❌ Main Memory

🧠 Explanation:
The CPU reads and executes instructions β€” it’s the β€œbrain” of the computer.


Question 7

What is “code” in the context of this course?
βœ… A sequence of instructions in a programming language
❌ A set of rules that govern the style of programs
❌ A password we use to unlock Python features
❌ A way to encrypt data during World War II

🧠 Explanation:
Code means program instructions written in a programming language like Python.


Question 8

A USB memory stick is an example of which computer component?
βœ… Secondary Memory
❌ Output Device
❌ CPU
❌ Main Memory

🧠 Explanation:
USB drives are secondary storage β€” data is kept even when the computer is off.


Question 9

What is the best way to think about a β€œSyntax Error”?
βœ… The computer did not understand the statement that you entered
❌ The computer is overheating
❌ Needs software upgrade
❌ Hates everyone from your town πŸ˜„

🧠 Explanation:
A syntax error means you typed something Python can’t interpret β€” it’s a language mistake.


Question 10

Which of the following is NOT one of the programming patterns covered in Chapter 1?
βœ… Random steps
❌ Conditional Steps
❌ Repeated Steps
❌ Sequential Steps

🧠 Explanation:
Basic programming patterns include sequential, conditional, and repeated steps β€” random steps are not a core pattern.


🧾 Summary Table

Q# βœ… Correct Answer Key Concept
1 What would you like to do? Interactive mode prompt
2 20 Variable reassignment
3 .py Python file extension
4 for Reserved keyword
5 quit() Exit command
6 CPU Executes instructions
7 Sequence of instructions Meaning of β€œcode”
8 Secondary Memory Storage example
9 Computer didn’t understand statement Syntax error definition
10 Random steps Not a core pattern