Skip to content

Commit b2d169a

Browse files
committed
Merge branch 'fix-typos' of https://github.com/code-for-tomorrow/python into fix-typos
2 parents 37c0cb9 + 903a3a0 commit b2d169a

File tree

4 files changed

+18
-4
lines changed

4 files changed

+18
-4
lines changed

1_beginner/chapter2/solutions/favorite.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,11 @@
99
favorite_person = input("Who is your favorite person? ")
1010

1111
# Display output
12-
print(favorite_person + " bought you " + favorite_food + " and " + favorite_drink + ".")
12+
print(
13+
favorite_person
14+
+ " bought you "
15+
+ favorite_food
16+
+ " and "
17+
+ favorite_drink
18+
+ "."
19+
)

1_beginner/chapter3/examples/logic_operators.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,10 @@
1111
# or
1212
was_computer_bought = True
1313
was_bike_bought = False
14-
print("Was a computer or bike bought? " + str(was_computer_bought or was_bike_bought))
14+
print(
15+
"Was a computer or bike bought? "
16+
+ str(was_computer_bought or was_bike_bought)
17+
)
1518

1619
# not
1720
is_raining = False

1_beginner/chapter3/practice/change.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919

2020
CENTS_PER_DOLLAR = 100
2121

22-
num_cents = int(float(input("How many dollars do you have: $")) * CENTS_PER_DOLLAR)
22+
num_cents = int(
23+
float(input("How many dollars do you have: $")) * CENTS_PER_DOLLAR
24+
)
2325

2426
# What do you do next? Write code here

1_beginner/chapter3/solutions/change.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,9 @@
2323
CENTS_PER_NICKEL = 5
2424

2525
# prompt user for dollars and convert it to cents
26-
num_cents = int(float(input("How many dollars do you have: $")) * CENTS_PER_DOLLAR)
26+
num_cents = int(
27+
float(input("How many dollars do you have: $")) * CENTS_PER_DOLLAR
28+
)
2729

2830
# calculate change and display it
2931
dollars = num_cents // CENTS_PER_DOLLAR

0 commit comments

Comments
 (0)