Question: Write a Python Program that that will keep track of their inventory. Create a class definition called Magic Machine that has the following attributes: name,

Write a Python Program that that will keep track of their inventory. Create a class definition called Magic Machine that has the following attributes: name, books, videos. Your class definition must contain the following methods:

add_books, increment the number of books

add_videos, increment the number of video recordings

ship_books, reduces the number of books

ship_videos, reduces the number of video recordings

The ship_book and ship_videos must not redoce the items below zero.Print warning instead. The (__init__) for the MagicMachine class requires that the name of the store be specified. An initial value for books and videos should be 0.

Define a _str_method for MagicMachine class that displays name of store and current number of books and videos.

Store your class definition in MagicMachine

Import module and create two different instances of the MagicMachine class.

Python program demonstrates all the class methods.

Remember to submit two python text files.( Text files are for the inventory of books and videos)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!