Skip to content

Commit 8778063

Browse files
committed
Fix code style issues with Black
1 parent 491808c commit 8778063

File tree

4 files changed

+4
-8
lines changed

4 files changed

+4
-8
lines changed

1_beginner/chapter2/solutions/favorite.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,4 @@
99
favorite_person = input("Who is your favorite person? ")
1010

1111
# Display output
12-
print(favorite_person + " bought you " + favorite_food + " and "
13-
+ favorite_drink + ".")
12+
print(favorite_person + " bought you " + favorite_food + " and " + favorite_drink + ".")

1_beginner/chapter3/examples/logic_operators.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@
1111
# or
1212
was_computer_bought = True
1313
was_bike_bought = False
14-
print("Was a computer or bike bought? "
15-
+ str(was_computer_bought or was_bike_bought))
14+
print("Was a computer or bike bought? " + str(was_computer_bought or was_bike_bought))
1615

1716
# not
1817
is_raining = False

1_beginner/chapter3/practice/change.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919

2020
CENTS_PER_DOLLAR = 100
2121

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

2524
# What do you do next? Write code here

1_beginner/chapter3/solutions/change.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,7 @@
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: $"))
27-
* CENTS_PER_DOLLAR)
26+
num_cents = int(float(input("How many dollars do you have: $")) * CENTS_PER_DOLLAR)
2827

2928
# calculate change and display it
3029
dollars = num_cents // CENTS_PER_DOLLAR

0 commit comments

Comments
 (0)