Project
Movie Marathon Planner
Uses conditional statements and lists to plan a movie marathon.
About
Uses conditional statements and lists to plan a movie marathon.
Technologies
Source Code
Python
print("Movie Marathon Planner")
print("Enter movie titles and runtimes. Type 'done' when finished.\n")
movies = {}
total_movies = 0
while True:
title = input("Movie title (or 'done'): ")
if title.lower() == "done":
break
runtime = int(input("Runtime in minutes: "))
movies[title] = runtime
total_movies += 1
print("\n--- Your Movie Marathon Itinerary ---")
time_since_bathroom = 0
time_since_snack = 0
current_time = 0
movie_number = 1
for title in movies:
runtime = movies[title]
print("{}. Watch '{}' ({} minutes)".format(movie_number, title, runtime))
current_time += runtime
time_since_bathroom += runtime
time_since_snack += runtime
if time_since_snack >= 240:
print("Snack Break (15 minutes)")
time_since_snack = 0
if time_since_bathroom >= 120:
print("Bathroom Break (5 minutes)")
time_since_bathroom = 0
movie_number += 1
print("\nEnjoy your movie marathon!")