In: Computer Science
#Write a class called "Burrito". A Burrito should have the
#following attributes (instance variables):
#
# - meat
# - to_go
# - rice
# - beans
# - extra_meat (default: False)
# - guacamole (default: False)
# - cheese (default: False)
# - pico (default: False)
# - corn (default: False)
#
#The constructor should let any of these attributes be
#changed when the object is instantiated. The attributes
#with a default value should be optional. Both positional
#and keyword attributes should be in the order shown above
#(for the autograder to work).
class Burrito:
def __init__(self, meat, to_go, rice,
beans, extra_meat=False, guacamole=False, cheese=False, pico=False,
corn=False):
self.meat =
meat
self.to_go =
to_go
self.rice =
rice
self.beans =
beans
self.extra_meat =
extra_meat
self.guacamole =
guacamole
self.cheese =
cheese
self.pico =
pico
self.corn =
corn
def get_meat(self):
return
self.meat
def set_meat(self, meat):
self.meat =
meat;
def get_to_go(self):
return
self.to_go
def set_to_go(self, to_go):
self.to_go =
to_go;
def get_rice(self):
return
self.rice
def set_rice(self, rice):
self.rice =
rice;
def get_beans(self):
return
self.beans
def set_beans(self, beans):
self.beans =
beans;
def get_extra_meat(self):
return
self.extra_meat
def set_extra_meat(self, extra_meat):
self.extra_meat =
extra_meat;
def get_guacamole(self):
return
self.guacamole
def set_guacamole(self, guacamole):
self.guacamole =
guacamole;
def get_cheese(self):
return
self.cheese
def set_cheese(self, cheese):
self.cheese =
cheese;
def get_pico(self):
return
self.pico
def set_pico(self, pico):
self.pico =
pico;
def get_corn(self):
return
self.corn
def set_corn(self, corn):
self.corn =
corn;
**************************************************
Thanks for your question. We try our best to help you with detailed
answers, But in any case, if you need any modification or have a
query/issue with respect to above answer, Please ask that in the
comment section. We will surely try to address your query ASAP and
resolve the issue.
Please consider providing a thumbs up to this question if it helps you. by Doing that, You will help other students, who are facing similar issue.