Python Programming
Why Stack Overflow recommends it
Stack Overflow users mention it because many beginners follow it as their first Python course and then ask about errors (especially around private attributes and inheritance) that come from copying its code.
Recommended by 1 people across 1 different months, 2016 to 2018.
What it is
A 43-minute single-sitting Python tutorial by Derek Banas that walks through installing Python, basic syntax, strings, lists, tuples, functions, exceptions, recursion, classes and inheritance. It is written along with the code in PyCharm and was originally published in 2014 on Python 3.4.
What people said
Recommends milpita · 2016-05 · Stack Overflow · on “Python Inheritance - Instance Has No Attribute”
JFYI This sample code is from Derek Banas' Python Tutorial [this video] . For those interested in learning Python or getting the full context.
Cites Mark Skelton · 2016-01 · Stack Overflow · on “Editor Font not displaying text properly in PyCharm”
I started using PyCharm recently but noticed something strange about the font. When I use a font that is not a monospace font it is displayed really strangely in PyCharm (see screenshot). Does anyone know how to fix this? I have seen non monospace font displayed properly in PyCharm by Derek Banas in his Python programming tutorial video [this video] so I know it will work but it isn't working for me. Here is the screenshot: [LINK] If you can't see it that well it looks like there are little white vertical lines through the text.
Cites Anis Ali Khan · 2016-02 · Stack Overflow · on “In this python beginners tutorial, where is the error resulting in AttributeError: 'Dog' object has no attribute '_Dog__name'?”
Should you need it, the tutorial I am following is Python Programming by Derek Banas: [this video] My source code follows: import sys import os class Animal: __name = "" __height = 0 __weight = 0 __sound = 0 def __init__(self, name, height, weight, sound): self.__name = name self.__height = height self.__weight = weight self.__sound = sound def set_name(self, name): self.__name = name def get_name(self): return self.__name def set_height(self, height): self.__height = height def get_height(self): return self.__height def set_weight(self, weight): self.__weight = weight def get_weight(self): return self.__weight def set_sound(self, sound): self.__sound = sound def get_sound(self): return self.__so
Cites Vaibhav Bajaj · 2016-07 · Stack Overflow · on “Python character rotation”
I primarily learnt python from Derek Banas' youtube video ( [this video] ) and checked out ` [LINK] site from time to time. As for my email, I am afraid I can not offer you personal information. You may of course contact me via StackOverflow Chat whenever you have a doubt.
Cites Platypus Egg · 2017-06 · Stack Overflow · on “Subclass not inheriting structure from superclass properly”
The tutorial I'm following is this one: [this video] with the relevant part starting at 32 mins. I'm still perplexed why no errors flew up for him...
Cites Platypus Egg · 2017-06 · Stack Overflow · on “Subclass not inheriting structure from superclass properly”
Interesting. Removing the double-underscores from all the attributes made the code work, so thank you. I think I understand how the name-mangling caused the problem. I guess my only question now is why it also worked for the highly-credible tutorial I was following: [this video] The class introduction stuff starts at 32 mins. He is using Python version 3.4.2...
Cites user8291511 · 2017-07 · Stack Overflow · on “Python - accessing parent attribute from child class method is weird”
I'm watching a python tutorial and the guy in the tutorial was able to make it work with private attributes. link to tutorial: [this video]
Cites joshcode · 2017-08 · Stack Overflow · on “"Content is not allowed in prolog" ... how to fix? (Python)”
I am within my first hour of teaching myself Python. I'm watching a video called "Python Programming" [this video] by Derek Banas, and I'm getting stuck already. As the video suggests, I am using PyCharm with Python 3.6. I have set the project interpreter to Python 3.6 and created a blank project. The video suggests I start on line one with a simple "import random" request, but when I try to run the request, PyCharm gives me the following error message: Cannot load settings from file '/Users/josh/PycharmProjects/attempt3/.idea/attempt3.iml': Error on line 1: Content is not allowed in trailing section. Please correct the file content..... Is this a matter of downloading a certain library or config
Cites Samson Daniel · 2018-12 · Stack Overflow · on “Why is <string>.format giving me this weird output in my inherited class object? (New to python)”
I am trying to write a toString() method in an inherited class but it is giving me weird output and I don't know why. New to Python, please help. This is part of the tutorial Python Programming: [this video] at minute 39. I tried changing the syntax a bit but the problem remained. Also, it didn't work with a direct call to the variables, as it is done in the video, but I had to use the get methods instead. Not sure why it works for him but not for me. class Animal: __name = "" __height = 0 __weight = 0 __sound = 0 def __init__(self, name, height, weight, sound): self.__name = name self.__height = height self.__weight = weight self.__sound = sound def get_name(self): return self.__name def get_hei