Top down program design is an approach to program design that starts with the general concept and repeatedly breaks it down into its component parts. In other words, it starts with the abstract and continually subdivides it until it reaches the specific. Consider creating the prime factorization of a number like 1540. The steps involved might look like:
1540
2 x 770
2 x 2 x 385
2 x 2 x 5 x 77
2 x 2 x 5 x 7 x 11
Top down program design works the same way. We start with the overall objective and wind up with a series of steps needed to accomplish it.
Answer:
Python script is given below
Explanation:
charge = float(input('Enter the amount you were charged. $'))
#setting the formula for tip and tax
tip = charge*.18
tax = charge*.07
#printing the values
print('Charge for the food: %.2f' % charge)
print('The tip amount: %.2f' % tip)
print('Tax amount: %.2f' % tax)
print('Total amount: %.2f' % (charge+tip+tax))