Skip to content

Commit bc782f9

Browse files
authored
Merge pull request #18 from code-for-tomorrow/fix-typos
Fix typos in Decisions 1 and Simplify
2 parents 4dd10f2 + ae3d157 commit bc782f9

File tree

5 files changed

+10
-9
lines changed

5 files changed

+10
-9
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Decisions 1
22
# Write in Python syntax what you would say
3-
# if you wanted either a 5 dollars OR (2 drinks AND 1 snack).
3+
# if you wanted either 5 dollars OR (2 drinks AND 1 snack).
44

55
# write your code here

1_beginner/chapter4/practice/menu.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
But if the customer enters 'french toast'
88
AND 'coffee', there is a discount of $1.
99
10-
And if the customer enters 'chicken soup' OR 'apple juice',
10+
Otherwise, if the customer enters 'chicken soup' OR 'apple juice',
1111
the price increases by $1.
1212
1313
Write a program that takes an order from a user

1_beginner/chapter4/practice/simplify.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
"""
2-
Here is a block of code where one tries do determine
3-
if somone is a nobel prize winner.
2+
Simplify
3+
Here is a block of code where one tries to determine
4+
if someone is a Nobel Prize winner.
45
56
Rewrite the code to work in one statement.
67

1_beginner/chapter4/solutions/menu.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
But if the customer enters 'french toast'
88
AND 'coffee', there is a discount of $1.
99
10-
And if the customer enters 'chicken soup' OR 'apple juice',
10+
Otherwise, if the customer enters 'chicken soup' OR 'apple juice',
1111
the price increases by $1.
1212
1313
Write a program that takes an order from a user
@@ -26,9 +26,8 @@
2626
# discount of $1 if the user orders french toast and coffee
2727
if food == 'french toast' and drink == 'coffee':
2828
total_cost -= 1
29-
3029
# charge extra $1 if user orders chicken soup or apple juice
31-
if food == 'chicken soup' or drink == 'apple juice':
30+
elif food == 'chicken soup' or drink == 'apple juice':
3231
total_cost += 1
3332

3433
# display total

1_beginner/chapter4/solutions/simplify.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
"""
2-
Here is a block of code where one tries do determine
3-
if somone is a nobel prize winner.
2+
Simplify
3+
Here is a block of code where one tries to determine
4+
if someone is a Nobel Prize winner.
45
56
Rewrite the code to work in one statement.
67

0 commit comments

Comments
 (0)