LearnPy Hub
← Classes & Objects problems
Medium

Counting Objects

Write a Ticket class with a class attribute that counts tickets created; each ticket gets the next number starting at 1. Read n names and print Ticket K: NAME for each, then the total.

Input

n, then n names.

Output

n + 1 lines.

Sample 1

Input
3
Mim
Rafi
Sara
Output
Ticket 1: Mim
Ticket 2: Rafi
Ticket 3: Sara
Total: 3

Sample 2

Input
1
A
Output
Ticket 1: A
Total: 1
solution.py
Output appears here
Counting Objects · Python practice problem · LearnPy Hub