0% found this document useful (0 votes)
15 views

Python

Uploaded by

Ana Busano
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views

Python

Uploaded by

Ana Busano
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

from collections import deque

def main():
movie = deque()
for i in range(1, 4):
movies = input(f"Enter movie {i} of 3: ")
movie.append(movies)

print()
snack = deque()
for i in range(1, 4):
snacks = input(f"Enter snack {i} of 3: ")
snack.append(snacks)

print("Movies to watch are:", movie)


print("Snacks available are:", snack)

while snack:
pressed = input("Press S each time you finish a snack: ").upper()
if pressed == "S":
snack.popleft()
print(snack)
if not snack:
print("No more snacks")

if __name__ == "__main__":
main()

You might also like