Gallery
Solution Transmit Music Festival
Share
Explore
Solution Transmit Music Festival

icon picker
Solution

Solution

Pseudocode design

initialise

set dayOneTicketPrice to 62.50 set dayOneTicketPrice to 119.50 set dayOneTicketPrice to 165.00

input

enter name
enter age
enter tickets

process

if age is more than age restriction then
enter day 1 tickets
enter day 2 tickets
enter day 3 tickets
calculate total cost
else
display error message
end if
2.1 calculate day 1 tickets as number of tickets x price 2.1 calculate day 2 tickets as number of tickets x price 2.1 calculate day 3 tickets as number of tickets x price 2.2 calculate totalTicket as day 1 total cost + day 2 total cost + day 3 total cost

output

display message with name
display message with day 1 tickets
display message with day 2 tickets
display message with day 3 tickets
display message with ticketTotal
solution
import time

oneDayTicketPrice = 62.50
twoDayTicketPrice = 119.50
threeDayTicketPrice = 165.00

print('\033[H\033[2J')
print('Transmit Music Festival')
print('=========================')
print('\n')

name = input('Enter name: ')
age = int(input('Enter age:'))



if age < 12:
print('Sorry you are not old enough')
else :
oneDayTickets = int(input('Number - 1 day tickets: '))
twoDayTickets = int(input('Number - 2 day tickets: '))
threeDayTickets = int(input('Number - 3 day tickets: '))

print('Processing...')
time.sleep(3);
dayOneTotalCost = oneDayTicketPrice * oneDayTickets;
dayTwoTotalCost = twoDayTicketPrice * twoDayTickets;
dayThreeTotalCost = threeDayTicketPrice * threeDayTickets;
totalCost = dayOneTotalCost + dayTwoTotalCost + dayThreeTotalCost;

# OUTPUT
print('\033[H\033[2J')
print('Transmit Music Festival')
print('\n')
print('Full name:' , name)
print('Day 1 tickets:', oneDayTickets)
print('Day 2 tickets:', twoDayTickets)
print('Day 3 tickets:', threeDayTickets)
print('Total Cost : £' + str(totalCost))
original
# Transmit Music Festival


# set initial values


# input data


# process results


# display output


Share
 
Want to print your doc?
This is not the way.
Try clicking the ⋯ next to your doc name or using a keyboard shortcut (
CtrlP
) instead.