Login Codeanywhethe Quick Python B Lab 1 Running Pyth Online Pdf Editor Create Class Named Q30456090

Using Python
Login- CodeanywheThe Quick Python B. Lab 1: Running Pyth Online PDF Editor Create a class named Spam in a file named spam-Py . You must attach your spam, py file to this question by using the file upload form below. Give the Spam class these properties: . An init method that has name and cost parameters. . A name()method stores the name of the Spam instance . A get nane) method that returns the instances name. A cost) method that stores the items cost. . A get costO method that returns the items cost. . A class variable named total, cost that contains the total cost of all existing items. Update this variable each time a new Spam instance is created. . A class method named get total cost) that returns total cost . A class variable named items count that keeps track of the objects created. Update this variable each time a new Spam instance is created. . A class method named get itens count() that returns items count Create amain() function that is executed when the spam.py code is run as a standalone script, like this on the command line: /spam.py All of these are gradable items In addition, write and run test code that Creates at least three Spam objects. Prints the output of the get total cost() and get items count) class methods each time an new spam object is created Prints the output of the get name) and get cost) for all three Spam objects. Include the output in your answerLogin- CodeanywheThe Quick Python B. Lab 1: Running Pyth Online PDF Editor Create a class named Spam in a file named spam-Py . You must attach your spam, py file to this question by using the file upload form below. Give the Spam class these properties: . An init method that has “name” and “cost” parameters. . A name()method stores the name of the Spam instance . A get nane) method that returns the instance’s name. A cost) method that stores the item’s cost. . A get costO method that returns the item’s cost. . A class variable named total, cost that contains the total cost of all existing items. Update this variable each time a new Spam instance is created. . A class method named get total cost) that returns total cost . A class variable named items count that keeps track of the objects created. Update this variable each time a new Spam instance is created. . A class method named get itens count() that returns items count Create amain() function that is executed when the spam.py code is run as a standalone script, like this on the command line: /spam.py All of these are gradable items In addition, write and run test code that Creates at least three Spam objects. Prints the output of the get total cost() and get items count) class methods each time an new spam object is created Prints the output of the get name) and get cost) for all three Spam objects. Include the output in your answer Show transcribed image text Login- CodeanywheThe Quick Python B. Lab 1: Running Pyth Online PDF Editor Create a class named Spam in a file named spam-Py . You must attach your spam, py file to this question by using the file upload form below. Give the Spam class these properties: . An init method that has “name” and “cost” parameters. . A name()method stores the name of the Spam instance . A get nane) method that returns the instance’s name. A cost) method that stores the item’s cost. . A get costO method that returns the item’s cost. . A class variable named total, cost that contains the total cost of all existing items. Update this variable each time a new Spam instance is created. . A class method named get total cost) that returns total cost . A class variable named items count that keeps track of the objects created. Update this variable each time a new Spam instance is created. . A class method named get itens count() that returns items count Create amain() function that is executed when the spam.py code is run as a standalone script, like this on the command line: /spam.py All of these are gradable items In addition, write and run test code that Creates at least three Spam objects. Prints the output of the get total cost() and get items count) class methods each time an new spam object is created Prints the output of the get name) and get cost) for all three Spam objects. Include the output in your answer Asked Jul. 29, 2018