# compute number of boxes for given number of books
box_height = 10.5
book_thickness = 1.2
# compute the number of books per standard box. Convert the result to an integer type
books_per_box = 8
# now ask the user for the number of books the customer ordered
books_ordered = int(input("books_ordered: "))
# compute the number of boxes needed. Store it in the variable called "num_boxes"
num_boxes = books_ordered/8
# compute how many books are left over, and then print the final message.
print('Books left',books_ordered%8)
Comments
Leave a comment