8000 Fix typos in comments · SaBo85/python-basics-exercises@921dc7d · GitHub
[go: up one dir, main page]

Skip to content

Commit 921dc7d

Browse files
committed
Fix typos in comments
1 parent a0f5a35 commit 921dc7d

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

ch08-conditional-logic/6-recover-from-errors.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616

1717
# Exercise 2
18-
# Print character and specifid index in string
18+
# Print character and specified index in string
1919

2020
input_string = input("Enter a string: ")
2121

ch08-conditional-logic/8b-challenge-simulate-a-coin-toss-experiment.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ def coin_flip():
3131
first_flip = coin_flip()
3232
flips = flips + 1
3333
# Continue flipping the coin and updating the tally until
34-
# a different result is returned by coin_flips()
34+
# a different result is returned by coin_flip()
3535
while coin_flip() == first_flip:
3636
flips = flips + 1
3737
# Increment the flip tally once more to account for the

ch08-conditional-logic/8c-challenge-simulate-a-coin-toss-experiment.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@
1616

1717

1818
def single_trial():
19-
"""Simulate repeatedly a coing until both heads and tails are seen."""
19+
"""Simulate repeatedly flipping a coin until both heads and tails are seen."""
2020
# This function uses random.randint() to simulate a single coin toss.
21-
# randing(0, 1) randomly returns 0 or 1 with equal probability. We can
21+
# randint(0, 1) randomly returns 0 or 1 with equal probability. We can
2222
# use 0 to represent heads and 1 to represent tails.
2323

2424
# Flip the coin the first time

ch08-conditional-logic/9a-challenge-simulate-an-election.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
else:
2727
votes_for_B = votes_for_B + 1
2828

29-
# Determine who wins the erd region
29+
# Determine who wins the 3rd region
3030
if random() < 0.17:
3131
votes_for_A = votes_for_A + 1
3232
else:

0 commit comments

Comments
 (0)
0