Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

need help for python make a class. It should be something offbeat so I know its not a direct example from the Internet.Some random ideas

need help for python

make a class. It should be something offbeat so I know its not a direct example from the Internet.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

Make sure your class has an init constructor that will set some initial properties

Make sure your class has three functions that do something

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.

just create TWO instances. So if you had created an instance of CryingBaby called Suzie now you would create a new instance called Sarah for example, and again, call the methods you wrote to show me you know how to create a second instance of a class and invoke its various methods.

You can have a menu interface to your program if you want but you dont need to. Its fine to just create the instances from the main method directly using hard-coded Python code/ a main function but either way show that you can get input from the user, create your two instances, have them do something, print out results and what not. For example, ask for their favorite artist, then ask them for several songs by that artist, then be able to print out the songs. Or create the artist and let them choose what to play, then print out a lyric,or, have them make a costom burger or decide what fast food to order from a menu of choices. Just show your code works.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Security

Authors: Alfred Basta, Melissa Zgola

1st Edition

1435453905, 978-1435453906

More Books

Students also viewed these Databases questions