#let's have some coffee coffee Coffee(__c_) coffee.sip() coffee.sip() coffee.sip() Select one or more: a. __a_ = sips_for_type[coffee_type] b = "There's no coffee left" _C__ = "espresso" b. C. d. __a__ = coffee_type b _C__ = espresso = "There's no coffee left" _a__ = sips_for_type[coffee_type] _b_= "There's no coffee left" _C__ = "macchiato" _a__ = sips_for_type[coffee_type] _b_= = "There's no coffee left __C__ "espresso" 11

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question
#let's have some coffee
Coffee (_c_)
coffee
coffee.sip()
coffee.sip()
coffee.sip()
else:
Select one or more:
b.
print(_b_)
a. __a_ = sips_for_type[coffee_type]
_b_ = "There's no coffee left"
__C__ = "espresso"
C.
d.
_a__ = coffee_type
_b_= "There's no coffee left"
_c_= espresso
_a_ = sips_for_type[coffee_type]
_b_= "There's no coffee left"
___C__ = "macchiato"
_a__ = sips_for_type[coffee_type]
_b_ = "There's no coffee left
__C__ = "espresso"
"1
Transcribed Image Text:#let's have some coffee Coffee (_c_) coffee coffee.sip() coffee.sip() coffee.sip() else: Select one or more: b. print(_b_) a. __a_ = sips_for_type[coffee_type] _b_ = "There's no coffee left" __C__ = "espresso" C. d. _a__ = coffee_type _b_= "There's no coffee left" _c_= espresso _a_ = sips_for_type[coffee_type] _b_= "There's no coffee left" ___C__ = "macchiato" _a__ = sips_for_type[coffee_type] _b_ = "There's no coffee left __C__ = "espresso" "1
3
ete
I of
Select the blank options which give you this output:
Pouring your coffee
Taking a sip
Taking a sip
There's no coffee left
class Coffee:
def __init__(self, coffee_type):
print("Pouring your coffee...")
{
sips_for_type
"espresso": 2,
"macchiato": 2,
"americano": 20,
"capuccino": 20
}
if coffee_type in ["macchiato", "capuccino"]:
print("foaming milk...")
def sip (self):
a.
self.sips_left = a
=
if self.sips_left > 0:
print("Taking a sip")
self.sips_left -= 1
print(_b_)
else:
#let's have some coffee
coffee = Coffee (_c___)
coffee.sip()
coffee.sip()
coffee.sip()
Select one or more:
a = sips for type[coffee type]
Transcribed Image Text:3 ete I of Select the blank options which give you this output: Pouring your coffee Taking a sip Taking a sip There's no coffee left class Coffee: def __init__(self, coffee_type): print("Pouring your coffee...") { sips_for_type "espresso": 2, "macchiato": 2, "americano": 20, "capuccino": 20 } if coffee_type in ["macchiato", "capuccino"]: print("foaming milk...") def sip (self): a. self.sips_left = a = if self.sips_left > 0: print("Taking a sip") self.sips_left -= 1 print(_b_) else: #let's have some coffee coffee = Coffee (_c___) coffee.sip() coffee.sip() coffee.sip() Select one or more: a = sips for type[coffee type]
Expert Solution
Step 1R

source code is :

class Coffee:
    def __init__(self, coffee_type):
        print("Pouring your coffee...")
        
        sips_for_type ={
            "espresso":2,
            "macchiato":2,
            "americano":20,
            "capuccino":20
        }
        if coffee_type in ["macchiato","capuccino"]:print("foaming milk...")
        self.sips_left = sips_for_type[coffee_type]
        
    def sip(self):
        if self.sips_left > 0:
            print("Taking a sip")
            self.sips_left -=1
        else:
            print("There's no coffee left   ")
#let's have some coffee
coffee = Coffee("espresso")
coffee.sip()
coffee.sip()
coffee.sip()
            

steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Knowledge Booster
Types of Loop
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education