Day 37 | Python OOPs – Classes & Objects 🚗🐍 Today I practiced Object-Oriented Programming (OOPs) in Python using a real-world example. 🔹 Created a Car class 🔹 Used __init__() constructor to initialize attributes 🔹 Defined instance variables (windows, doors, enginetype) 🔹 Wrote a method using self 🔹 Created multiple objects from the same class 🔹 Accessed object attributes individually 📌 Key Learning: One class ➝ multiple objects ➝ each object has its own data but same structure. OOP helps in: ✔ Code reusability ✔ Better structure ✔ Real-world problem modeling
Python OOP: Classes & Objects with Car Example
More Relevant Posts
-
Day 40 of Learning Python 🐍 | OOPs Basics 🚗 Today I strengthened my understanding of Object-Oriented Programming (OOPs) in Python by working hands-on with a simple Car class. 🔑 Topics covered: Defining a class and creating objects Using the __init__() constructor to initialize attributes Understanding self and instance variables Accessing object properties (windows, doors, enginetype) Calling class methods (drive()) 💡 Key takeaway: OOP helps in modeling real-world entities in code, making programs more structured, reusable, and readable.
To view or add a comment, sign in
-
-
Day 42 | Python OOPs – Magic Methods & Object Introspection 🐍✨ Today I explored some powerful dunder (magic) methods in Python using a simple Car class 🚗 🔹 __init__() – Initializes object state (windows, doors, engine type) 🔹 Public variables – All instance variables are accessible by default 🔹 __str__() – Controls what gets printed when an object is displayed 🔹 __sizeof__() – Gives memory-related info about an object 🔹 dir() – Helps inspect all attributes & methods of an object 🔹 Instance methods – Behavior like drive() defined inside the class 📌 Key Learning: Magic methods let us customize object behavior and understand how Python internally handles objects.
To view or add a comment, sign in
-
-
My level of programming knowledge can be assessed as just an amateur. I have the baggage of programming in a different era, where C dominated. I am frustrated by the fragility of version control in python packages. Setting up multiple environments for different projects really chews up disk space. Operating system upgrades can break the functionality of environments. I was intrigued when the DGX spark recommended relying on Docker containers. I think I've come to realize that the Docker container helps improve the stability of python development by not only freezing the python interpreter and package environment, but also the operating system and terminal shell program. Docker containers take a lot of space, but I suspect that when I return after 6 months to see if the software still works, the Docker container may be the best way to ensure stability. Feel free to educate me.
To view or add a comment, sign in
-
Just released nas-sync-script-builder — a Python GUI that generates a Bash script for safe, one-way NAS sync on Linux using rsync and lsyncd. Perfect for incremental, append-only updates without touching existing NAS files. GitHub: https://lnkd.in/dC_ZmYqU
To view or add a comment, sign in
-
RopParser is a Python utility that processes and analyzes Return-Oriented Programming (ROP) gadgets from rp++ outputs. Developed during OffSec's Windows exploit development courses (EXP-301 and EXP-401), this tool helps security researchers efficiently identify, categorize, and filter useful ROP gadgets for exploit development. 🔗 https://lnkd.in/gUPduszC
To view or add a comment, sign in
-
First Project Release – QR Code Converter (.exe) I developed a QR Code Converter using Python, Tkinter, OpenCV, and Pillow. The application allows users to generate and scan QR codes through a simple, desktop-based interface. This is my first end-to-end project, covering everything from development to packaging it as a Windows .exe, so it can run without requiring Python installation. 🔧 Key Features Generate QR codes from text and URLs Scan QR codes from image files User-friendly GUI Standalone Windows executable 📂 GitHub Repository 👉https://lnkd.in/gxYGg_eS 💾 Download (.exe) 👉https://lnkd.in/gwzxU5f4 📚 What I Learned GUI development with Tkinter Image processing using OpenCV Converting Python applications into executables Fundamentals of software deployment This project is part of my ongoing focus on building practical, real-world Python applications. Constructive feedback and improvement ideas are welcome. #Python #Tkinter #OpenCV #DesktopApp #SoftwareDevelopment #GitHub #LearningByBuilding
To view or add a comment, sign in
-
Raspberry Pi project update 📽️ I’m now capturing short videos from the command line ✔️ . Next Step: wrap it in a Python script, schedule it, and auto-post clips to Discord. 🤠 #raspberrypi #cli #automation #computervision #FFmpeg #Linux #Python #SideProject
To view or add a comment, sign in
-
Day 46 of #100DaysOfDevOps >Dockerized a Python application today and deployed it on an app server. >Created a Dockerfile for the Python app, installed dependencies using requirements.txt, exposed the required port, and ran the application using server.py. >Built a custom image and deployed it as a container with proper port mapping. Finally tested the app using curl and confirmed it was running as expected. Commands used: >docker build -t nautilus/python-app . >docker run -d --name pythonapp_nautilus -p 8095:5001 nautilus/python-app >curl http://localhost:8095/ This task helped me understand the full flow of taking a simple app and running it inside a container. Learning step by step. #100DaysOfDevOps #DevOpsJourney #Docker #Python #Linux #HandsOnLearning #KodeKloud
To view or add a comment, sign in
-
-
📘 Python Learning Series | Editors Used in Programming As part of revising programming fundamentals, I explored the editors/IDEs used for different programming languages—the environments where we write, run, and debug code. 🔹 Editors for Java Eclipse, NetBeans, IntelliJ 🔹 Editors for Python IDLE, Jupyter Notebook, PyCharm, Spyder, Google Colab, Online Editors, CodingRooms 🔹 Editors for C++ Codeblocks, Sublime Text, Turbo C++, Dev C, Visual Studio Choosing the right editor can improve productivity, debugging, and overall coding experience. Each tool has its own strengths depending on the language and use case. Continuing to strengthen my fundamentals—one concept at a time 🚀 #Python #ProgrammingBasics #IDEs #LearningJourney #Upskilling
To view or add a comment, sign in
-
I started revisiting python programming language videos wanted to share what I learned from videos in YouTube. why we need to learn python: ---------------------------------------------------- 1) Open source : Using python we can develop any application, no need to pay to develop anything 2) Cross platform : Python can run on any OS like MAC, Windows, Linux 3) More libraries and tools available : Already predefined more libraries available to use and develop 4) More community support: If any issue we have more community support to resolve issues. #python #learning #beginner #teaching #dreem #content #creator #automation
To view or add a comment, sign in
-
Explore related topics
Explore content categories
- Career
- Productivity
- Finance
- Soft Skills & Emotional Intelligence
- Project Management
- Education
- Technology
- Leadership
- Ecommerce
- User Experience
- Recruitment & HR
- Customer Experience
- Real Estate
- Marketing
- Sales
- Retail & Merchandising
- Science
- Supply Chain Management
- Future Of Work
- Consulting
- Writing
- Economics
- Artificial Intelligence
- Employee Experience
- Workplace Trends
- Fundraising
- Networking
- Corporate Social Responsibility
- Negotiation
- Communication
- Engineering
- Hospitality & Tourism
- Business Strategy
- Change Management
- Organizational Culture
- Design
- Innovation
- Event Planning
- Training & Development