File tree Expand file tree Collapse file tree 2 files changed +16
-16
lines changed Expand file tree Collapse file tree 2 files changed +16
-16
lines changed Original file line number Diff line number Diff line change 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
Original file line number Diff line number Diff line change 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" )
You can’t perform that action at this time.
0 commit comments