Skip to content

Commit 4d9bbe1

Browse files
committed
Fix style for Alternating and Names exercises
1 parent da99482 commit 4d9bbe1

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

1_beginner/chapter5/practice/alternating.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
"""
1+
"""
2+
Alternating
23
34
Ask the user for an integer. The print the numbers from 1 to that number,
45
but alternating in sign. For example, if the input was 5, what would be printed
56
is 1, -1, 2, -2, 3, -3, 4, -4, 5. (Note, DO NOT include the last negative
67
number).
78
89
Do this with a for loop
9-
1010
"""
1111

1212
# Write code here.

1_beginner/chapter6/solutions/names.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
# Some other possible answers:
1515
# group = people[0, 5, 2] or people[0, len(people), 2]
1616

17-
group = people[0 : len(people) : 2]
17+
group = people[0:len(people):2]
1818

1919
print(people)
2020
print(group)

0 commit comments

Comments
 (0)