Skip to content

Commit 5e93cd5

Browse files
authored
theatre code.
1 parent ef11757 commit 5e93cd5

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Assessment/Wk4/theatre.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# calculate ticket costs for theatre bookings
22

3+
import time
4+
35
# helpers
46

57
## function to get an integer with error checking
@@ -96,13 +98,17 @@ def get_y_n ( input_prompt ):
9698

9799
bill_total=ttl_bill_pre_discount - bill_discount + p_n_p_cost
98100

101+
# generate bill reference
102+
bill_ref=str(time.time())[3:10]
103+
99104
# output bill
100105
print ( )
101106
print ( "The Sandford Paladium")
102107
print ( "*" * 21 )
103108
print ()
104109

105110
print ( f'{num_in_party} Tickets for Snakes! The Musical' )
111+
print ( f'{"Order Ref: " + bill_ref:>35}')
106112
print ( '-' * 35 )
107113
if is_collection == "Y" :
108114
print ( "*" * 9, " COLLECTION ", "*" * 9 )

0 commit comments

Comments
 (0)