In this exercise, you will write a program that increases and decreases a number of likes
based on user input
in a looping menu. Some of the code has been written for you!
In the editor below, fill in the blanks (________
) so that the program behaves like the example screenshot below.
Remember to use the Python reference sheet to help you with your code! Click on one of the buttons below:
Need some help? Click here to reveal a video walkthrough for this task!
a
to increase the number of likes
by one or b
to decrease the likes
by one. The program never ends.likes
variable to an integer using the int()
command, or you might get an error! What happens when you don’t convert the variable to an integer? Why do you think this happens?Below is an example of how the program should run:
Starting likes: 4
Current likes:
4
a. for thumbs up
b. for thumbs down
Enter your choice: a
Current likes:
5
a. for thumbs up
b. for thumbs down
Enter your choice: b
Current likes:
4
a. for thumbs up
b. for thumbs down
Enter your choice: b
Current likes:
3
a. for thumbs up
b. for thumbs down
Enter your choice: