Queer European MD passionate about IT

nutrition.py 542 B

1234567891011121314
  1. fruits = {'apple': '130', 'avocado': '50', 'banana': '110', 'cantaloupe': '50',
  2. 'grapefruit': '60', 'grapes': '90', 'honeydew melon': '50', 'kiwifruit': '90', 'lemon': '15', 'lime': '20',
  3. 'nectarine': '60', 'orange': '80', 'peach': '60', 'pear': '100', 'pineapple': '50', 'plums': '70', 'strawberries': '50',
  4. 'sweet cherries': '100', 'tangerine': '50', 'watermelon': '80'}
  5. def main():
  6. fruit = input("Item:\t\t").lower()
  7. if fruit in fruits:
  8. print(f"Calories:\t\t{fruits[fruit]}")
  9. if __name__ == "__main__":
  10. main()