Python is a popular high-level, general-purpose programming language created by Guido van Rossum and first released in 1991. It is known for simple, readable syntax that looks close to English, which makes it a good first language. Python is free and open-source, runs on Windows, Linux, macOS and even Android phones, and is used in web development, data science, artificial intelligence, automation and education.
Key terms
- Python
- high-level, interpreted, general-purpose language
- IDLE
- Python's built-in editor and shell
- Interactive mode
- running commands one at a time at the >>> prompt
- Script mode
- writing a program in a .py file and running it
- print()
- function that displays output
- input()
- function that reads user input as text
- Comment
- note starting with # that Python ignores
- Syntax error
- mistake in the rules of the language
Summary
- Python is simple, free and widely used.
- Interactive mode tests commands; script mode runs .py files.
- print() outputs, input() reads, # starts a comment.
- Python is case-sensitive and uses indentation for blocks.
In everyday life: Ethiopian university and coding-bootcamp students often start programming with Python because it is free, simple and widely used in AI.
Check yourself
- Who created Python?
- What is the difference between interactive and script mode?
- What does input() return?
- Why does indentation matter in Python?
Practice questions
1. Which Python function displays output on the screen?
- A. input()
- B. print()
- C. len()
- D. int()
Show answer
Answer: print()
print() writes values to the screen; input() reads text typed by the user.
On WeLearn
The full lesson: reading notes, worked examples, class activities and the Unit 6 quiz
Study Basics of Python on WeLearnTeach Basics of Python with WeLearn
We will bring a demo to your school: a lesson on your interactive TV, a virtual lab and a classroom game, with your own teachers.
