+ 5

Translate this Java code to Python

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

27th Sep 2017, 12:13 PM
Udochi Wilson Obinna
Udochi Wilson Obinna - avatar
1 Answer
+ 3
Like this? coffee = Coffee() if coffee.empty: coffee.refill() else: coffee.drink()
27th Sep 2017, 12:23 PM
Patrick Yu
Patrick Yu - avatar