Python

Solution - Basic Syntax

Ticket Machine

Our Solution

Here is our solution:

tickets = input(“Enter number of tickets: ")
total_cost = int(tickets) * 11.99
print(“The total cost of “ + tickets + “ tickets is $" + total_cost + “.")    

Output:

Enter number of tickets: 7
The total cost of 7 tickets is $83.93.    

If you don’t understand something, feel free to ask us on our Discord server or simply contact us.

chevron_up