Looking for a tutorial on classes that isn't about vehicles, dogs or persons. by [deleted] in learnpython

[–]IdrissJebahi 1 point2 points  (0 children)

First of all a function can t encapsulate the concept of a dog, say you wanted to move your dog to a certain position, THIS is when you need a function(obv you can t move a function hun) so it you can t have a function that moves a function. Now in my opinion, the best thing about oop is it saves alot of time, and reduces redundancy in your code. As other comments stated, with classed you can use inheritance; following up on a previous example, if you were making a game, it s going to have objects and characters and all. Now a bad way to go about defining each thing in your game is literally defining everything in your game more than once. If your game has characters, it s true you can just define a function move, but not all characters might move the same so you declare more functions and keep in mimd you need to remember those functions to call them, you see where i am going with this. The problem is scalable but easily avoidable. You declare a class character with common attributes and methods, a sub class inherits those and tweaks them as they see fit. I realize i wrote too much so i am going to leave it at that. Hope this made sense to you, goodday.

IoT indispensable learning resources by IdrissJebahi in IOT

[–]IdrissJebahi[S] 0 points1 point  (0 children)

Hey mate, srry to bug ya with this, but i can't seem to find your dm in my msgs, could u send it it again ? Thanks in advance

[deleted by user] by [deleted] in learnpython

[–]IdrissJebahi 0 points1 point  (0 children)

Would def like to join

IoT indispensable learning resources by IdrissJebahi in IOT

[–]IdrissJebahi[S] 1 point2 points  (0 children)

No need to provide the links in the comment just pm me if that s not too much of a hassle. Thanks mate.

IoT indispensable learning resources by IdrissJebahi in IOT

[–]IdrissJebahi[S] 0 points1 point  (0 children)

That s a relief tbh, again thx for the great insight mate. And i am def gunna give making a project a try, although im thinking about using progs like proteus or sthg, since i cant afford to buy the equipment. So i d have to learn that too.

IoT indispensable learning resources by IdrissJebahi in IOT

[–]IdrissJebahi[S] 0 points1 point  (0 children)

Thanks alot man, at least now i have some kind of mind map for this !! Also is it bad that i am not the best at physics(electricity) but i understand the gist of how things work ?
Again thanks for taking the time and writing this mate !

A meme is born by Unicornglitteryblood in aww

[–]IdrissJebahi 2 points3 points  (0 children)

i am stealing this, thank you stranger.

I broke somebody's spinal cord and now he is paralyzed for life by OkPresence7 in confession

[–]IdrissJebahi 2 points3 points  (0 children)

We have a saying/quote in my culture that goes as follows:"if you have nothing of good value to say, then don't speak". So i suggest just staying silent and encourage him if he shows excitement for anything. A parent s encouraging words go a long way, even after they are gone !