Created
December 7, 2025 17:40
-
-
Save delululala/9d13c2015397ba6e271c6b2ac93b89e6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| db_id = 'lulumimi' | |
| db_pass = '123456' | |
| user_id = input('Enter your ID: ') | |
| user_password = input('Enter your password: ') | |
| movie_info = {'Agak Laen':50, 'Wicked':40, 'Zootopia':30} | |
| movie_reserved = {'Agak Laen':24, 'Wicked':12, 'Zootopia':4} | |
| flag = 'YES' | |
| #LOGIN | |
| while user_id != db_id or user_password != db_pass: | |
| print('Log In Unseccesfull') | |
| user_id = input('Enter your ID: ') | |
| user_password = input('Enter your password: ') | |
| print('Avaible Movies: ', 'Agak Laen,', 'Wicked,', 'Zootopia,') | |
| while True: | |
| movie_name = input('Choose a movie: ').title() | |
| if movie_name not in movie_info: | |
| print('Movie not found. Please choose again') | |
| continue | |
| reg = int(input('Ticket Quantity: ')) | |
| if(reg + movie_reserved[movie_name]) <= movie_info[movie_name]: | |
| movie_reserved[movie_name] += reg | |
| print('Reservation successful!') | |
| break | |
| else: | |
| possible = movie_info[movie_name] - movie_reserved[movie_name] | |
| print('Tickets exceed the limit.') | |
| print('Available tickets:', possible) | |
| flag = input ('Do you want to chose another movie? Yes/No: ') | |
| if flag.lower() == 'no': | |
| print('Log Out') | |
| break | |
| print('Thank You for Your Reservation') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment