Gallery
Solution Athletics Scotland
Share
Explore
Solution Athletics Scotland

icon picker
Solution

Solution

solution
# Athletics Scotland
# ==================
import time

# display title and sports on offer
print('\n')
print(' ATHLETICS SCOTLAND ')
print('====================')
print('\n')
print('Sports on offer to watch:')
print('- 100m Sprint')
print('- Relay')
print('- Hurdles')
print('- Long Jump')
print('\n\n')

# get sport from user
sport = input('Which sport are you going to see: ')
# get number of tickets from user
numberOfTickets = int(input('Number of Tickets: '))

print('\n')
print('Processing order...')
# pauses screen for 3 seconds
time.sleep(3)
# clears screen
print('\033[H\033[2J')
print('\n\n')

for i in range(0, numberOfTickets, 1):
# get user name
fullName = input('Enter next full name: ')
# display ticket details
print('\n')
print('-------------------------------------')
print('Athletics Scotland - Grand Prix Event')
print('Sport: ' + sport)
print('Full name: ' + fullName)
print('Ticket number ' + str(i+1))
print('-------------------------------------')
print('\n')
# end loop
original
# Athletics Scotland
# ==================
import time

# display title and sports on offer
print('\n')
print(' ATHLETICS SCOTLAND ')
print('====================')
print('\n')
print('Sports on offer to watch:')
print('- 100m Sprint')
print('- Relay')
print('- Hurdles')
print('- Long Jump')
print('\n\n')

# get sport from user
sport = input('Which sport are you going to see: ')
# get number of tickets from user
numberOfTickets = int(input('Number of Tickets: '))

print('\n')
print('Processing order...')
# pauses screen for 3 seconds
time.sleep(3)
# clears screen
print('\033[H\033[2J')
print('\n\n')

# get user name
fullName = input('Enter next full name: ')
# display ticket details
print('\n')
print('-------------------------------------')
print('Athletics Scotland - Grand Prix Event')
print('Sport: ' + sport)
print('Full name: ' + fullName)
print('-------------------------------------')
print('\n')
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.