Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: TypeError that i can't solve it
Post: TypeError that i can't solve it

class MACD_Strategy: def __init__(self, stock_price, MACD, MACD_Signal): self.stock_price = stock_price self.MACD = MACD self.MACD_Signal = MACD_Signal def trade(s...
cls0724 General Coding Help 1 1,580 May-29-2020, 07:14 AM
    Thread: Problem about yield, please help!!
Post: RE: Problem about yield, please help!!

Thanks for your help! While i am trying my very best to understand the logic behind...but my question remains there. Perhaps let me try to elaborate my concern in a more detailed way. My understandi...
cls0724 General Coding Help 5 2,810 Apr-08-2020, 03:46 PM
    Thread: Problem about yield, please help!!
Post: RE: Problem about yield, please help!!

sorry, but i still dun get how yield nested can link to yield element here. I thought yield nested just returns a value then that's it? So why would we need yield elementSorry, this recursive generato...
cls0724 General Coding Help 5 2,810 Apr-07-2020, 04:42 PM
    Thread: Problem about yield, please help!!
Post: Problem about yield, please help!!

I am still new to Python and i come across the below sample from my textbook that confuses me quite a lot. [u]def flatten(nested, indent=""): try: print(indent, "Going to iterate over", nested)...
cls0724 General Coding Help 5 2,810 Apr-06-2020, 05:05 PM
    Thread: dict and __dict__
Post: dict and __dict__

Here, may i know why when i use Peter.dictthe following error will occur Error:Traceback (most recent call last): File "<stdin>", line 1, in <module> AttributeError: 'Celsius' object ha...
cls0724 General Coding Help 1 2,586 Apr-05-2020, 06:24 AM
    Thread: Questions about class
Post: Questions about class

class FooBar: def init(self): print(self)From the above example, i learn that i can't define a as the below code a = FooBar() a.init(42)Otherwise it will have the below error Error:Traceback (m...
cls0724 General Coding Help 1 1,452 Apr-01-2020, 02:18 PM
    Thread: Simple python code error
Post: RE: Simple python code error

but why the following codes work by adding another list into the end of the tuple pair? def init(data): data['first'] = {} data['middle'] = {} data['last'] = {} def store(data, full_name): n...
cls0724 General Coding Help 5 3,270 Mar-12-2020, 10:21 AM
    Thread: Simple python code error
Post: Simple python code error

Hi all, I am trying to get myself familiar with zip function and turns out Key error 1 keeps popping up when i typed the following program. I seriously have no idea what's wrong in this program... ...
cls0724 General Coding Help 5 3,270 Mar-11-2020, 03:31 PM

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020