seats = 3
rating = 12
print('Hello and welcome to Daisy\'s cinema.')
while seats > 0:
name = input('What is your name?')
print('Hello',name,'\n')
print('We are currently showing Mockingjay at out cinema.')
film = input('What film would you like to watch?')
if film != 'Mockingjay' or 'mockingjay':
print('I\'m sorry but we aren\'t showing that film.\n\n')
else:
print('This film currently has',seats,'free seats and a certificate of',rating,'\n')
age = int(input('How old are you?'))
if age > 15 or age == 15:
print('You have booked a ticket to see this film.\n\n')
seats == seats-1
else:
print('I\'m sorry but you\'re too young to see this film.\n\n')
print('Mockingjay is now full. Thank you for booking your tickets. \n\n')
这段代码根本不起作用。当我在电影标题中加入 Mockingjay 或 mockingjay 以外的其他内容时,效果很好,但如果我放入这些内容,它仍然会说这部电影没有放映。什么时候应该继续说有多少免费座位以及证书是什么。有任何想法吗?我使用 Python 3.1。