Thanks in advance as I've gotten wordy.

I want to integrate the following working code into a website:


beef_quantity = 28  ## Set before campaign starts.
print('Original Beef Quantity: ')  ## Displays the wording "Original
Beef Quantity: "
print (beef_quantity)  ## Displays the beef quantity before order

beef_choice = 'Quarter_Beef' ## Based on Customer's choice

if beef_choice == 'Quarter_Beef':
    print('Quarter Beef selected')  ## Notice of beef quantity ordered
    print('New Beef Quantity: ')  ## Displays the wording "New beef quantity: "
    new_beef_quantity = beef_quantity - 1  ## Updates the beef
quantity after order
    print(new_beef_quantity)  ## Displays the updated beef quantity after order
elif beef_choice == 'Half_Beef':
    print('Half Beef selected')  ## Notice of beef quantity ordered
    print('New Beef Quantity: ')  ## Displays the wording "New beef quantity: "
    new_beef_quantity = beef_quantity - 2  ## Updates the beef
quantity after order
    print(new_beef_quantity)  ## Displays the updated beef quantity after order
else:
    print('Whole Beef selected')  ## Notice of beef quantity ordered
    print('New Beef Quantity: ')  ## Displays the wording "New beef quantity: "
    new_beef_quantity = beef_quantity - 4  ## Updates the beef
quantity after order
    print(new_beef_quantity)  ## Displays the updated beef quantity after order

I also have two other similar code pieces (delivery.py and locker.py)
that I want to integrate, but I'll put them in other emails.

My end goal (which I still have to figure out) is to have the customer
click on three sections of radio buttons and enter two text fields
which will then display in an alert box where they can click a button
to send them to PayPal for payment.  The other part of this is that
the number of available beef will countdown as each order is placed
until zero s available which will then display "Sold Out!"  Not sure
if this is ALL python or part python and part javascript.

Again, Thank you.
Joe
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor

Reply via email to