File size: 998 Bytes
d76fd61
74088e2
d76fd61
 
 
 
 
005814c
 
d76fd61
74088e2
005814c
74088e2
d76fd61
74088e2
 
 
 
 
d76fd61
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# Simple movie recommendations by genre
movie_recommendations = {
    "comedy": {"title": "Palm Springs (2020)", "image_url": "https://image-url.com/palm-springs.jpg"},
    "action": {"title": "Tenet (2020)", "image_url": "https://image-url.com/tenet.jpg"},
    "drama": {"title": "Nomadland (2020)", "image_url": "https://image-url.com/nomadland.jpg"},
    "romance": {"title": "The Half of It (2020)", "image_url": "https://image-url.com/the-half-of-it.jpg"},
    "thriller": {"title": "The Invisible Man (2020)", "image_url": "https://image-url.com/the-invisible-man.jpg"}
}

# Ask user for their preferred genre
genre_input = input("Enter your preferred genre (comedy, action, drama, romance, thriller): ").lower()

# Fetch the movie recommendation
movie = movie_recommendations.get(genre_input, None)

if movie:
    print(f"We recommend you watch '{movie['title']}'!")
    print(f"Movie Image: {movie['image_url']}")
else:
    print("Sorry, we couldn't find a recommendation for that genre.")