We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f364b8d commit 677b151Copy full SHA for 677b151
week2/nutrition/nutrition.py
@@ -0,0 +1,27 @@
1
+fruit = input("Input: ").lower()
2
+
3
+list = {
4
+ "apple": 130,
5
+ "avocado": 50,
6
+ "banana": 110,
7
+ "cantaloupe": 50,
8
+ "grapefruit": 60,
9
+ "grapes": 60,
10
+ "honeydew melon": 50,
11
+ "kiwifruit": 90,
12
+ "lemon": 15,
13
+ "lime": 20,
14
+ "nectarine": 60,
15
+ "orange": 80,
16
+ "peach": 60,
17
+ "pear": 100,
18
+ "pineapple": 50,
19
+ "plums": 70,
20
+ "strawberries": 50,
21
+ "sweet cherries": 100,
22
+ "tangerine": 50,
23
+ "watermelon": 80
24
+}
25
26
+if fruit in list:
27
+ print(f"Calories: {list[fruit]}")
0 commit comments