-
Welcome French Translation at Two Whole Stations and 4 Mission of OOP Series!
Hello, checkiomates🐱👤!
The first important thing we want to share with you this week, is that all missions at the first two stations of easy difficulty - "Strings and Integers" and "List but not the least" - are translated into French!🥐
🏁 MISSIONS:
Speaking about new missions, CheckiO team is preparing for you a simple series about basic terms of Object Oriented Programming (OOP). Now we are ready to offer you the first four missions of the series.
OOP 1: First Look at Class and Object by freeman_lex -
This series of tasks will help you learn the basics of OOP in Python, such as creating classes, attributes, and methods, inheritance, method overrides, using super(), and polymorphism. If you need additional help, you may use this documentation or another one.
1.1. Create a Car class that contains no methods or attributes.
1.2. Create an object my_car from the Car class.
OOP 2: Class Attributes by freeman_lex -
2.1. Add the wheels class attribute inside the Car class and assign it a value of "four".
2.2. Add the doors class attribute inside the Car class and assign it a value of 4.
OOP 3: Initializing by freeman_lex -
3.1. Add an __init__() function to the Car class that takes the brand and model arguments and assigns them to the appropriate object attributes.
3.2. You already have an object my_car that was created without passing additional arguments. So, in order not to cause errors when creating an object in this way, let's add a default value for the arguments of the __init__() function. They mast have values of empty string "".
3.3. Create two new Car objects by passing the following string values as arguments. some_car1: brand - Ford, model - Mustang; some_car2: model - Camaro. Notice, that the second car has only model, it's brand must remains default.
OOP 4: Adding Methods by freeman_lex -
4.1. Add the working_engine class attribute inside the Car class and assign it a value of False.
4.2. Add a start_engine method to the Car class, that displays the message "Engine has started" and changes the working_engine value to True.
4.3. Add a stop_engine method to the Car class, that displays the message "Engine has stopped" and changes the working_engine value to False.
4.4. Call the start_engine method for both some_car1, some_car2.
💡ARTICLES:
We are also trying to provide you with interesting topics to read and discuss. These time they are about using ChatGPT as you coding mentor, using properties to add dynamic behavior to attributes and explaining recursion.
ChatGPT: Your Personal Python Coding Mentor - Large language models (LLMs) have quickly gained popularity since OpenAI released ChatGPT for public access. Since then, people have used ChatGPT for fun, creative, and useful purposes. If you’ve dreamed about using ChatGPT as your Python coding mentor, then keep on reading.
Use Properties to Add Dynamic Behavior to Attributes - Properties, defined via the property built-in, are a Python feature that lets you add dynamic behaviour behind what is typically a static interface: an attribute. Properties also have other benefits and use cases, and we will cover them here.
Python Recursion: a Trampoline from the Mutual Head to the Memoized Nested Tail - Recursion is a key concept of programming. However, it is usually only superficially explored. There are different ways of having recursion, this post will illustrate them.
A bit of humor at the end!
🙌 Thanks for your attention! Hope to meet you at CheckiO. We are really interested in your thoughts! Please, leave a comment below! ⤵
Welcome to CheckiO - games for coders where you can improve your codings skills.
The main idea behind these games is to give you the opportunity to learn by exchanging experience with the rest of the community. Every day we are trying to find interesting solutions for you to help you become a better coder.
Join the Game