17
Lesson 17 of 20 ยท Abstraction
Abstraction โ Part 6
Hide details. Your own abstractions. This is part 6 of 20.
What you'll learn
You will learn that abstraction means using things by name without needing to know the details inside.
Steps
- 1greet('Alex') prints 'Hello, Alex'. You don't need to know HOW print() draws text on screen โ you just use it. That's abstraction!
- 2Abstraction means using something by name without knowing every detail inside. You use a TV remote without knowing its circuits.
- 3The greet() function takes a 'name' parameter โ different input, same behavior. greet('Alex') โ Hello, Alex. greet('Sam') โ Hello, Sam.
- 4As you build bigger programs, you'll create your own functions to hide complexity. This keeps code clean and easy to understand.
Key Terms
- Abstraction
- Using something by its name without needing to know every detail of how it works.
- Parameter
- Information you pass into a function (e.g. name). The function uses it inside.
- Detail
- The inner workings hidden behind a function name.
Python 3
Output
Loading Python... This may take a few seconds.
Your code runs only in your browser. No code is sent to any server. Stay safe and have fun learning!
๐จ๏ธView in Shop
Checkout complete lesson on Abstraction for 8th Grade
Get the full Abstraction track as a printable PDF โ all lessons, worksheets, and answer keys.
