This is the main.py file:
from data import MENU, resources
def display_resources(store):
print(f"""Water : {store['water']} ml
Milk : {store['milk']} ml
Coffee :{store['coffee']} """)
# TODO 1. Print the resources when user gives input of "report"
user_prompt = input("What would you like to have ? (expresso/latte/cappuccino): ").lower()
if user_prompt == "report":
print(display_resources(resources))
data.py contains
resources = {
"water": 300,
"milk": 200,
"coffee": 100,
}
When I give "report" as user_prompt, my output loops like:
Water :300ml
Milk :200ml
Coffee :100g
None
Why does None get printed at the end of the output?