Object: Methods and properties

UpComing SoftWare Training Demos

๐Ÿš€ *Playwright With AI Testing Demo In Telugu*
๐Ÿ—“๏ธ *Date:* 28 Oct2026, 08:00 PM IST
๐Ÿ“ *Register Now!:*
https://www.vlrt.in/3r
๐Ÿ‘ฅ *Join WA Community:*
https://www.vlrt.in/3w
๐Ÿ’ก *Course Content:*
https://www.vlrt.in/3c
โ–ถ๏ธ *Demo Videos:*
https://www.vlrt.in/3v

๐Ÿš€ *Gen AI Engineer (Production Focused)*
๐Ÿ—“๏ธ *Date:* 29th Oct 2026, 06:00PM IST
๐Ÿ“ *Register Now!:*
https://www.vlrt.in/gr
๐Ÿ‘ฅ *Join WA Community:*
https://www.vlrt.in/gw
๐Ÿ’ก*Course Content:*
https://www.vlrt.in/ai
โ–ถ๏ธ *Demo Videos:*
https://www.vlrt.in/gv

๐Ÿš€ *Vulnerability Management Training Demo*
๐Ÿ—“๏ธ *Date:* 28th Oct 2026, 10:00 AM IST
๐Ÿ“*Register Now!:*
https://www.vlrt.in/vr
๐Ÿ‘ฅ *Join Community:*
https://www.vlrt.in/cw
๐Ÿ’ก *Course Content:*
https://www.vlrt.in/vc
โ–ถ๏ธ *Demo Videos:*
https://www.vlrt.in/Vm

๐Ÿš— Car Properties โš™๏ธ Car Methods

๐Ÿš— Car Properties

Properties are the nouns that describe a car. They are the characteristics or attributes that define a specific car’s state. Think of them as the data associated with a car object.

Examples:

  • ๐ŸŽจ color: The color of the car (e.g., red, blue, black).
  • ๐Ÿญ make: The brand of the car (e.g., Toyota, Ford, Honda).
  • ๐Ÿท๏ธ model: The specific model of the car (e.g., Corolla, Mustang, Civic).
  • ๐Ÿ“… year: The year the car was manufactured (e.g., 2025).
  • โšก speed: The current speed of the car (e.g., 0 mph, 60 mph).
  • ๐Ÿ”‘ is_engine_on: A state that tells you if the engine is running (True or False).
  • โ›ฝ fuel_level: The amount of gas in the tank (e.g., 75%).

โš™๏ธ Car Methods

Methods are the verbs that describe what a car can do. They are the actions or functions that operate on the car’s properties. Methods often change the state of the car.

Examples:

  • โ–ถ๏ธ start_engine(): This method changes the is_engine_on property from False to True.
  • ๐Ÿš€ accelerate(): This method increases the car’s speed property.
  • ๐Ÿ›‘ brake(): This method decreases the car’s speed property.
  • โน๏ธ turn_off_engine(): This method changes the is_engine_on property from True to False.
  • เน€เธ•เธดเธก refuel(amount): This method takes an amount as input and increases the fuel_level property.
  • ๐Ÿ”Š honk_horn(): This method performs an action (makes a sound).

Bank Account Properties Methods

๐Ÿฆ Bank Account Properties

Properties are the nouns that describe a bank account. They represent the data and characteristics that make each account unique. Think of them as the information you see on your bank statement.

Examples:

  • ๐Ÿ”ข account_number: A unique number assigned to the account. This property is crucial because it identifies the specific account.
  • ๐Ÿ‘ค account_holder_name: The name of the person or business that owns the account.
  • ๐Ÿ’ฐ balance: The current amount of money in the account. This is the most important property as it changes with every transaction.
  • ๐Ÿ’ณ account_type: The kind of account it is, such as savings, checking, or current.
  • ๐Ÿ’ฒ currency: The type of currency the account holds (e.g., USD, EUR, INR).

๐Ÿ’ธ Bank Account Methods

Methods are the verbs that describe what you can do with a bank account. They are the actions or functions that allow you to interact with the account’s properties, particularly its balance.

Examples:

  • ๐Ÿ“ฅ deposit(amount): This method adds money to the account. When you deposit money, the balance property increases.
  • ๐Ÿ“ค withdraw(amount): This method removes money from the account. It also checks if there is enough money in the balance before allowing the withdrawal.
  • โ„น๏ธ get_balance(): This method returns the current value of the balance property without allowing you to change it directly. This is a common way to see how much money is in the account.
  • โžก๏ธ transfer(target_account, amount): This method is a bit more complex. It first calls the withdraw() method from the current account and then calls the deposit() method on the target_account.
  • ๐Ÿ“œ check_transactions(): This method provides a history of all deposits and withdrawals that have occurred on the account.

๐Ÿ” Food Order Properties And Methods

๐Ÿ” Food Order Properties

Properties are the nouns that describe a food order. They represent the data and characteristics that make each order unique. Think of them as the details on a receipt.

Examples:

  • ๐Ÿ“ order_id: A unique number assigned to the order. This is like a ticket number.
  • ๐Ÿง‘โ€๐Ÿณ customer_name: The name of the person who placed the order.
  • ๐Ÿ“‹ items: A list of the food items included in the order (e.g., ['burger', 'fries', 'soda']).
  • ๐Ÿ’ฒ total_price: The total cost of the order, calculated from the items.
  • ๐Ÿ“ delivery_address: The location where the food needs to be delivered.
  • โฑ๏ธ status: The current state of the order, such as pending, in_progress, delivered, or cancelled.

๐Ÿ“ฒ Food Order Methods

Methods are the verbs that describe what can be done with a food order. They are the actions or functions that allow the system to manage the order’s properties.

Examples:

  • โž• add_item(item_name, price): This method adds a new food item to the items list and updates the total_price property.
  • โž– remove_item(item_name, price): This method removes an item from the items list and reduces the total_price.
  • โœ… confirm_order(): This method changes the status of the order from pending to in_progress and sends a confirmation to the customer.
  • ๐Ÿšš dispatch_delivery(): This method changes the status to dispatched and assigns a delivery driver.
  • โŒ cancel_order(): This method changes the status to cancelled and might trigger a refund process.

๐Ÿ“š Book Properties & Methods

A book can be an object with properties that describe it and methods that allow you to interact with it.


๐Ÿ“– Book Properties

Properties are the nouns that describe a book’s characteristics.

  • title: The name of the book (e.g., 'The Hitchhiker's Guide to the Galaxy').
  • author: The person who wrote the book (e.g., 'Douglas Adams').
  • page_count: The total number of pages in the book (e.g., 42).
  • current_page: The page number the reader is currently on.
  • is_open: A state that tells you if the book is currently open or closed (True or False).

๐Ÿ“š Book Methods

Methods are the verbs that describe what a book can do or what you can do with it.

  • open(): Changes the is_open property to True.
  • close(): Changes the is_open property to False.
  • turn_page(): Increases the current_page property by one.
  • read(pages): Advances the current_page by a specified number of pages.
  • get_progress(): Calculates and returns the percentage of the book you have read.

๐Ÿ’ป Laptop Properties & Methods

A laptop can also be an object with its own unique properties and methods.


๐Ÿ’ป Laptop Properties

Properties are the nouns that describe a laptop’s state and hardware.

  • brand: The manufacturer of the laptop (e.g., 'Dell', 'Apple').
  • model: The specific model name (e.g., 'XPS 15', 'MacBook Air').
  • battery_level: The current battery charge percentage (e.g., 85%).
  • is_on: A state that tells you if the laptop is powered on (True or False).
  • screen_brightness: The current brightness level of the display.

๐Ÿ–ฅ๏ธ Laptop Methods

Methods are the verbs that describe what a laptop can do or how a user can control it.

  • power_on(): Changes the is_on property to True and performs a startup routine.
  • shut_down(): Changes the is_on property to False.
  • increase_brightness(): Increases the screen_brightness property.
  • run_program(program_name): Launches a specific application.
  • charge(): Increases the battery_level property over time.

Similar Posts

  • Thonny: A User-Friendly Python IDE for Beginners in 2025

    Thonny is a free and open-source Integrated Development Environment (IDE) specifically designed for beginners learning Python. It provides a simple and user-friendly interface, making it an excellent choice for those new to programming. Key Features: Why Thonny is good for beginners: How to install Thonny: If you’re new to Python and looking for a user-friendly…

  • Data hiding

    Data hiding in Python OOP is the concept of restricting access to the internal data of an object from outside the class. ๐Ÿ” It’s a way to prevent direct modification of data and protect the object’s integrity. This is typically achieved by using a naming convention that makes attributes “private” or “protected.” ๐Ÿ”’ How Data…

  • Random Module?

    What is the Random Module? The random module in Python is used to generate pseudo-random numbers. It’s perfect for: Random Module Methods with Examples 1. random() – Random float between 0.0 and 1.0 Generates a random floating-point number between 0.0 (inclusive) and 1.0 (exclusive). python import random # Example 1: Basic random float print(random.random()) # Output: 0.5488135079477204 # Example…

  • Predefined Character Classes

    Predefined Character Classes Pattern Description Equivalent . Matches any character except newline \d Matches any digit [0-9] \D Matches any non-digit [^0-9] \w Matches any word character [a-zA-Z0-9_] \W Matches any non-word character [^a-zA-Z0-9_] \s Matches any whitespace character [ \t\n\r\f\v] \S Matches any non-whitespace character [^ \t\n\r\f\v] 1. Literal Character a Matches: The exact character…

  • Lambda Functions in Python

    Lambda Functions in Python Lambda functions are small, anonymous functions defined using the lambda keyword. They can take any number of arguments but can only have one expression. Basic Syntax python lambda arguments: expression Simple Examples 1. Basic Lambda Function python # Regular function def add(x, y): return x + y # Equivalent lambda function add_lambda =…

  • what is pythonย 

    What is Python? Python is a popular, high-level programming language known for its simplicity and readability. Because its syntax closely resembles everyday English, it is incredibly easy for beginners to learn, read, and write. Despite being beginner-friendly, it is also one of the most powerful languages in the world, used heavily by professionals for artificial…

Leave a Reply

Your email address will not be published. Required fields are marked *