Skip to content

Commit f841e3d

Browse files
authored
Merge pull request #22 from code-for-tomorrow/fix-typo
Fix typos in Hours and TV problems
2 parents bc782f9 + 724c8bf commit f841e3d

File tree

4 files changed

+18
-18
lines changed

4 files changed

+18
-18
lines changed

1_beginner/chapter4/practice/hours.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Hours
22
# Write a program that asks the user
33
# how many hours they spend on the internet
4-
# per day, and return if they’re addicted
4+
# per day, and print if they’re addicted
55
# or not based on the hours. (5 or more hours
66
# is addicted, less is not).
77

1_beginner/chapter4/solutions/hours.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Hours
22
# Write a program that asks the user
33
# how many hours they spend on the internet
4-
# per day, and return if they’re addicted
4+
# per day, and print if they’re addicted
55
# or not based on the hours. (5 or more hours
66
# is addicted, less is not).
77

1_beginner/chapter5/practice/TV.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# TV
2-
# Pretend you just got a 37 on your test,
3-
# and you mom says you can’t watch TV until you get above an 84.
4-
# (HINT: comparison operators). You increase
5-
# your test score 6 points per day (iterations).
2+
# Pretend you just got a 50 on your test,
3+
# and you mom says you can’t watch TV until you get
4+
# a score of at least 80. (HINT: comparison operators).
5+
# You increase your test score by 10 points per day.
66
# Write a program that tells you after
7-
# how many days you'll be able to watch TV
7+
# how many days you'll be able to watch TV. Use a loop.
88

99
# write code here
Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
# TV
2-
# Pretend you just got a 37 on your test,
3-
# and you mom says you can’t watch TV until you get above an 84.
4-
# (HINT: comparison operators). You increase
5-
# your test score 6 points per day (iterations).
2+
# Pretend you just got a 50 on your test,
3+
# and you mom says you can’t watch TV until you get
4+
# a score of at least 80. (HINT: comparison operators).
5+
# You increase your test score by 10 points per day.
66
# Write a program that tells you after
7-
# how many days you'll be able to watch TV
7+
# how many days you'll be able to watch TV. Use a loop.
88

9-
x = 37
10-
d = 0
11-
while x < 84:
12-
x += 6
13-
d += 1
14-
print(d)
9+
x = 50
10+
days = 0
11+
while x < 80:
12+
x += 10
13+
days += 1
14+
print("You can watch TV after", days, "days")

0 commit comments

Comments
 (0)