Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- total_ticket_count = 0
- student_ticket_count = 0
- standard_ticket_count = 0
- kid_ticket_count = 0
- line = input()
- while line != "Finish":
- free_seats = int(input())
- current_ticket_count = 0
- input_current_ticket = input()
- while input_current_ticket != "End":
- current_ticket_count += 1
- if input_current_ticket == "student":
- student_ticket_count += 1
- elif input_current_ticket == "standard":
- standard_ticket_count += 1
- elif input_current_ticket == "kid":
- kid_ticket_count += 1
- if current_ticket_count == free_seats:
- break
- input_current_ticket = input()
- print(f"{line} - {(current_ticket_count / free_seats * 100):.2f}% full.")
- total_ticket_count += current_ticket_count
- line = input()
- print(f"Total tickets: {total_ticket_count}")
- print(f"{student_ticket_count / total_ticket_count * 100 :.2f}% student tickets.")
- print(f"{standard_ticket_count / total_ticket_count * 100 :.2f}% standard tickets.")
- print(f"{kid_ticket_count / total_ticket_count * 100:.2f}% kids tickets.")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement