All Questions
9 questions
1vote
3answers
143views
A Class that creates a unit of Stock or a collection of Stocks
I have a dataclass of a single class object 'AStock' as such: ...
8votes
3answers
3kviews
Calculate evapotranspiration
I am trying to create a code for the Basic evapotranspiration equation by Hargreaves. I have attached a screenshot of the equation to be replicated. I want to create a class wherein I can input data ...
3votes
1answer
45views
Weekly Dose tracker with time and dose mean
Function: Outputs daily and weekly dose totals with means for time between doses and dose amount. Code: ...
2votes
1answer
208views
Extending the inclusion-exclusion principle to general objects
Introduction I have implemented a generalization to the inclusion-exclusion principle, which extends the principle from sets to more general objects. In short the principle calculates the left by ...
3votes
2answers
294views
Temperature Converter: °C to K
What it does Converts melting point and boiling point from degrees celsius to kelvin These are in a dict which is in a tuple as no changes should be made to it No user input Purpose Learning ...
3votes
1answer
217views
Game in Python3 using OOP
So iam making a game using OOP in python however is this the best practise when defining your objects? are you meant to define them all at the end of the script like I've done, or are you meant to ...
2votes
1answer
5kviews
Python code for simple Vending Machine simulation implementing OOP principles
I am recently learning OOP concepts and thought that implementing a simple workflow simulating a vending machine would help me put what I've learnt into practice. I am open to criticisms and feedback, ...
7votes
2answers
2kviews
Cleanly passing in a large number of mutable parameters through a python class
I want to create two classes, one for attributes and one for functional behaviors. The point of the attributes class was to hold all of the attributes along with property methods (setters/getters), ...
14votes
2answers
2kviews
Blackjack with card representation visuals
To try and practice OOP, I've heard making a blackjack game can be really helpful; which it has been. I don't know how 'advanced' an implementation this is; but it has all the standard features, like ...