# Starting code for this project
When developing a text-based application, you'll often have similar parts to other text-based applications. That's because all these applications need user menus and to ask for user input.
That's why for this project we'll provide a little bit of code to get you started, since it's similar to last section's project!
Here's the provided code, in app.py
:
import database
menu = """Please select one of the following options:
1) Add new movie.
2) View upcoming movies.
3) View all movies
4) Watch a movie
5) View watched movies.
6) Exit.
Your selection: """
welcome = "Welcome to the watchlist app!"
print(welcome)
database.create_tables()
while (user_input := input(menu)) != "6":
if user_input == "1":
pass
elif user_input == "2":
pass
elif user_input == "3":
pass
elif user_input == "4":
pass
elif user_input == "5":
pass
else:
print("Invalid input, please try again!")
Notice that this menu is slightly different from the one in the project overview. That's because in the initial stage of our application, we can't support multiple users.
With this code we have a pretty good idea of what comes next: implementing the different branches of the if statement.
Let's get started in the next chapter by thinking about the queries we'll need to interact with our database!