8000 Use movie title instead of movie name throughout. · DORELAS/complete-python-course@ca3ccb4 · GitHub
[go: up one dir, main page]

Skip to content

Commit ca3ccb4

Browse files
committed
Use movie title instead of movie name throughout.
1 parent 0394605 commit ca3ccb4

File tree

1 file changed

+6
-6
lines changed
  • course_contents/3_first_milestone_project/milestone_1

1 file changed

+6
-6
lines changed

course_contents/3_first_milestone_project/milestone_1/app.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
MENU_PROMPT = "\nEnter 'a' to add a movie, 'l' to see your movies, 'f' to find a movie by name, or 'q' to quit: "
1+
MENU_PROMPT = "\nEnter 'a' to add a movie, 'l' to see your movies, 'f' to find a movie by title, or 'q' to quit: "
22
movies = []
33

44

55
def add_movie():
6-
name = input("Enter the movie name: ")
6+
title = input("Enter the movie title: ")
77
director = input("Enter the movie director: ")
88
year = input("Enter the movie release year: ")
99

1010
movies.append({
11-
'name': name,
11+
'title': title,
1212
'director': director,
1313
'year': year
1414
})
@@ -20,16 +20,16 @@ def show_movies():
2020

2121

2222
def print_movie(movie):
23-
print(f"Name: {movie['name']}")
23+
print(f"Title: {movie['title']}")
2424
print(f"Director: {movie['director']}")
2525
print(f"Release year: {movie['year']}")
2626

2727

2828
def find_movie():
29-
search_name = input("Enter movie name you're looking for: ")
29+
search_title = input("Enter movie title you're looking for: ")
3030

3131
for movie in movies:
32-
if movie["name"] == search_name:
32+
if movie["title"] == search_title:
3333
print_movie(movie)
3434

3535

0 commit comments

Comments
 (0)
0