Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Price should be listed first in Ch 4 challenge Stock object instantiation #5

Copy link
Copy link
@JimMcKenzieSmith

Description

@JimMcKenzieSmith
Issue body actions

The stocks list needs to be fixed to pass the price first. That's because it is extends the abstract class, which has the price field. The fix is:

stocks = [
    Stock(342.0, "MSFT", "Microsoft Corp"),
    Stock(135.0, "GOOG", "Google Inc"),
    Stock(275.0, "META", "Meta Platforms Inc"),
    Stock(120.0, "AMZN", "Amazon Inc")
]

See:

Stock("MSFT", 342.0, "Microsoft Corp"),
Stock("GOOG", 135.0, "Google Inc"),
Stock("META", 275.0, "Meta Platforms Inc"),
Stock("AMZN", 120.0, "Amazon Inc")

https://github.com/LinkedInLearning/python-object-oriented-programming-4413110/blob/7ff2416cc66500026ecfb3221c67fabf10386a41/Finished/Ch%204/challenge.py#L36C1-L39C39

SHypoleac

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.