Home / Expert Answers / Computer Science / python-explanation-pls-explain-you-will-be-creating-a-pizza-class-it-should-have-the-following-pa890

(Solved): python explanation pls explain \# You will be creating a Pizza class. It should have the following ...



python explanation pls explain

student submitted image, transcription available below
\# You will be creating a Pizza class. It should have the following attributes: \#- Size \# - Sauce \# - Toppings, which should be a list \# You need to create one method that corresponds with each of the above attribute \# which returns the corresponding attribute, just the value. \# For the size and toppings attributes, you will need to have a method to set the \# - For Size, ensure it is an int (inches) \# - If it is not, default to a 10" pizza (you can store ten). These checks should occur in init as well. \# - For toppings, you will need to add the toppings. \# - This method needs to be able to handle multiple values. \# - Append all elements to the list. \# Create a method that returns the amount of toppings. \# In your __init__( ) method, you should take in size and sauce as parameters. \# - - Saucé should have a default value of red. \# - Size will not have a defautt value; use the parameter with the same safety checks defined above (you can use the set method). \# Within _intt_(1), you will need to: \#- Assign the parameter for stze to a stze attribute. \#- Assign the parameter for sauce to the attribute. \# - Create the topptings attribute, starting off as a list only holding cheese.


We have an Answer from Expert

View Expert Answer

Expert Answer



We have an Answer from Expert

Buy This Answer $5

Place Order

We Provide Services Across The Globe