import time print("Welcome to Physics Book Store!") print("You can find every book to learn physics better here!") print("-----------------------------------------------------") time.sleep(1) print("Here is our selection of AP books for you!") print("1 - AP Physics 1 - $7.99 - Stock: 3") print("2 - AP Physics 2 - $9.99 - Stock: 2") print("3 - AP Physics C (Volume 1) - $6.99 - Stock: 2") print("4 - AP Physics C (Volume 2) - $6.99 - Stock: 2") print("5 - Mastering Physics - $18.99 - Stock: 4") print("6 - AP Calculus AB - $5.99 - Stock: 2") print("7 - AP Calculus BC - $8.99 - Stock: 3") print("8 - Mastering Calculus - $15.99 - Stock: 1") print("-----------------------------------------------------") time.sleep(2) print("Instructions:") time.sleep(1) print("The program will ask you which book do you want to buy, you can buy by typing the book number.") time.sleep(2) print("The program also will ask you do you want to buy, if you want to buy you should type yes, if not then you should type no with small letters.") time.sleep(2) print("The book number is the number at front of the book name (1-8).") time.sleep(2) print("If you buy every book (1-8) once, you will get a %20 discount for those.") time.sleep(2) print("If you buy every physics book (1-5) once, you will get a %15 discount for those.") time.sleep(2) print("If you buy every calculus book (6-8) once, you will get a %10 discount for those.") time.sleep(2) print("If you buy both volumes of the Physics C (3-4) once, you will get a %5 discount for those.") print("-----------------------------------------------------") time.sleep(2) yes_or_no=str(input("Do you want to buy a book? ")) price=0 stock1=3 stock2=2 stock3=2 stock4=2 stock5=4 stock6=2 stock7=3 stock8=1 while yes_or_no=="yes": purchased_book=int(input("Which book do you want to buy? ")) while purchased_book==1: price=price+7.99 stock1=stock1-1 print("AP Physics 1 purchased.") print("Current total: "+str(price)) yes_or_no=str(input("Do you want to buy a book? ")) while purchased_book==2: price=price+9.99 stock2=stock2-1 print("AP Physics 2 purchased.") print("Current total: "+str(price)) yes_or_no=str(input("Do you want to buy a book? ")) while purchased_book==3: price=price+6.99 stock3=stock3-1 print("AP Physics C (Volume 1) purchased.") print("Current total: "+str(price)) yes_or_no=str(input("Do you want to buy a book? ")) while purchased_book==4: price=price+6.99 stock4=stock4-1 print("AP Physics C (Volume 2) purchased.") print("Current total: "+str(price)) yes_or_no=str(input("Do you want to buy a book? ")) while purchased_book==5: price=price+18.99 stock5=stock5-1 print("Mastering Physics purchased.") print("Current total: "+str(price)) yes_or_no=str(input("Do you want to buy a book? ")) while purchased_book==6: price=price+5.99 stock6=stock6-1 print("AP Calculus AB purchased.") print("Current total: "+str(price)) yes_or_no=str(input("Do you want to buy a book? ")) while purchased_book==7: price=price+8.99 stock7=stock7-1 print("AP Calculus BC purchased.") print("Current total: "+str(price)) yes_or_no=str(input("Do you want to buy a book? ")) while purchased_book==8: price=price+15.99 stock8=stock8-1 print("Mastering Calculus purchased.") print("Current total: "+str(price)) yes_or_no=str(input("Do you want to buy a book? "))