Translate this Java code to Python | Sololearn: Learn to code for FREE!

+5

Translate this Java code to Python

Coffee coffee = new Coffee(); if (coffee.Empty){ coffee.Refill(); }else { coffee.Drink(); }

9/27/2017 12:13:18 PM

Udochi Wilson Obinna

1 Answer

New Answer

+3

Like this? coffee = Coffee() if coffee.empty: coffee.refill() else: coffee.drink()