Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 2

class MovieTime :

def main( args) :

sc = "Python-inputs"

movs = [] # queue lists for storage movies

snack = [] # queue lists for storage snack

choice = "S"

bool = False

print("Enter number 3 for 3 movies inputs: ", end ="") # users input to 3

em = int(input())

print("Enter number 3 for 3 snacks inputs: ", end ="") # users input to 3

es = int(input())

print("")

i=0

while (i < em) :# for loop for the users input length

print("Enter movie #:" + str((i + 1)) + ":", end ="") # the question will loop based on what number
inputed

mov1 = input()

movs.append(mov1)

i += 1

i=0

while (i < es) : # for loop for the users input

print("Enter snacks #:" + str((i + 1)) + ":", end ="") # the question will loop based on what number
inputed

snacks = input()

snack.append(snacks)

i += 1

print("")

print("Movies to watch are:" + str(movs))

print("Snacks available are:" + str(snack))


print("Press S each time you finish a snack.") # press S to pop the lists

while (not bool) : # sets to false first

deq = input()

if deq == choice: # if the user pressed letter S the first input on the snack will pop/remove

snack.pop() # removes the first in from the user

print(snack) # prints the new lists

if not snack: # when the program has no list to pop this statement will proceed

print("No more snacks")

bool = True

if __name__=="__main__":

MovieTime.main([])

You might also like