Question: python assistance thank you Make a class. It should be something offbeat so I know its not a direct example from the Internet. I will
python assistance thank you
Make a class. It should be something offbeat so I know its not a direct example from the Internet. I will do an example in class to make this easier for you. Some random ideas are:
A crying baby and you can ask it if it is crying, make it cry, and/or ask it for a reason (maybe it has an array of reasons like Im hungry etc and it returns back a reason).
A foodie class where you can initialize it to have a few food choices then ask it what you should eat, custom make a burger, or order food etc. It can be anything as long as it is totally original.
Some imaginary or real math calculations that you invent or a graph or plot
Storing your favorite songs/playlist, or creating an artist class and then it stores and lets you add songs to it.
A sociopath, it could let you add sociopathic things he/she did such as Stole from moms wallet, on Jan 2 2020, Lied to his boss on Dec 20 2020, (etc get creative)
Feel good quotes, you could ask for a quote to make you grateful, it gives you one, Ask for one to make you feel relaxed, and so on. Eightball - shake the eight ball, get different fortunes
Your class should have a __init__ constructor. Make sure your class has an init constructor that will set some initial properties
It should have two-three additional functions that do something. Make sure your class has three functions that do something
At least one of the functions needs to (returns a value) that does something cool. At least one of your procedures (or function) should take a parameter(s).
Make sure your class has one or two member variables/attributes
Make sure your class has a data structure, for example, it could be a list that you add songs to, or tuples that store coordinates, or a dictionary used for something, an array, set, etc. You can pick whatever data structure you want.
Create an instance and demo how it can be used
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
