I'm making a auto-pick program where it will pick a specific tv show or movie depending on whether you want to watch a movie or a tv show. The first if statement picks a movie and the elif statement picks a tv show. Even though I input the statement to run elif, it will always run if, and never run elif.
>answer=input('Welcome to Showpicker. First off, would you like to watch a movie or a TV show? ' )
if answer := 'Movie''movie':
import time
import random
print('Great choice!')
time.sleep(1)
print('I will now pick a movie for you to watch!')
movie = ['The Hunt','Atonement','Da Vinci Code','The Menu','Dead Poets Society','Harry Potter `Series','The Shining','Exorcist','1917','Maurice','Call Me by Your Name','The Father','Fantastic Beasts Series','James Bond Series','Dune','Dune 2','Indiana Jones Series','Drive','Blade Runner Series','John Wick Series','Mission Impossible series','Drive','The Name of the Rose']
time.sleep(3)
print(random.choice(movie))
time.sleep(3)
print("Enjoy!Don't forget your popcorn.")
exit()
elif answer:='TV show''TVshow''tv show''tvshow':
import time
import random
print('Great choice!')
time.sleep(1)
print('I will now pick a TV show for you to watch!')
TV = ['Hannibal','Peaky Blinders','House MD','Stranger Things','Breaking Bad','The Mentalist']
time.sleep(3)
print(random.choice(TV))
time.sleep(1)
print("Enjoy!Don't forget your popcorn.")
exit()
As a result, it will always show the movie option even though whether I input Tv show or movie.