diff --git a/1_beginner/chapter4/practice/hours.py b/1_beginner/chapter4/practice/hours.py index fa9b8e15..53d87890 100644 --- a/1_beginner/chapter4/practice/hours.py +++ b/1_beginner/chapter4/practice/hours.py @@ -1,7 +1,7 @@ # Hours # Write a program that asks the user # how many hours they spend on the internet -# per day, and return if they’re addicted +# per day, and print if they’re addicted # or not based on the hours. (5 or more hours # is addicted, less is not). diff --git a/1_beginner/chapter4/solutions/hours.py b/1_beginner/chapter4/solutions/hours.py index 8e5a97d8..87b964e1 100644 --- a/1_beginner/chapter4/solutions/hours.py +++ b/1_beginner/chapter4/solutions/hours.py @@ -1,7 +1,7 @@ # Hours # Write a program that asks the user # how many hours they spend on the internet -# per day, and return if they’re addicted +# per day, and print if they’re addicted # or not based on the hours. (5 or more hours # is addicted, less is not). diff --git a/1_beginner/chapter5/practice/TV.py b/1_beginner/chapter5/practice/TV.py index 9a2e1622..842bc783 100644 --- a/1_beginner/chapter5/practice/TV.py +++ b/1_beginner/chapter5/practice/TV.py @@ -1,9 +1,9 @@ # TV -# Pretend you just got a 37 on your test, -# and you mom says you can’t watch TV until you get above an 84. -# (HINT: comparison operators). You increase -# your test score 6 points per day (iterations). +# Pretend you just got a 50 on your test, +# and you mom says you can’t watch TV until you get +# a score of at least 80. (HINT: comparison operators). +# You increase your test score by 10 points per day. # Write a program that tells you after -# how many days you'll be able to watch TV +# how many days you'll be able to watch TV. Use a loop. # write code here diff --git a/1_beginner/chapter5/solutions/TV.py b/1_beginner/chapter5/solutions/TV.py index 510df61d..76f87a2e 100644 --- a/1_beginner/chapter5/solutions/TV.py +++ b/1_beginner/chapter5/solutions/TV.py @@ -1,14 +1,14 @@ # TV -# Pretend you just got a 37 on your test, -# and you mom says you can’t watch TV until you get above an 84. -# (HINT: comparison operators). You increase -# your test score 6 points per day (iterations). +# Pretend you just got a 50 on your test, +# and you mom says you can’t watch TV until you get +# a score of at least 80. (HINT: comparison operators). +# You increase your test score by 10 points per day. # Write a program that tells you after -# how many days you'll be able to watch TV +# how many days you'll be able to watch TV. Use a loop. -x = 37 -d = 0 -while x < 84: - x += 6 - d += 1 -print(d) +x = 50 +days = 0 +while x < 80: + x += 10 + days += 1 +print("You can watch TV after", days, "days")