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.
The answer is D. Electoral College
Answer:
name = []
price = []
for i in range(0,8):
item_name = input('name of item')
item_price = input('price of item')
name.append(item_name)
price.append(item_price)
for i in range(0, 8):
print(name[i], '_____', price[i])
Explanation:
Python code
Using the snippet Given :
Apples 2.10
Hamburger 3.25
Milk 3.49
Sugar 1.99
Bread 1.76
Deli Turkey 7.99
Pickles 3.42
Butter 2.79
name = []
price = []
#name and price are two empty lists
for i in range(0,8):
#Allows users to enter 8 different item and price choices
item_name = input('name of item')
item_price = input('price of item')
#user inputs the various item names and prices
#appends each input to the empty list
name.append(item_name)
price.append(item_price)
for i in range(0, 8):
print(name[i], '_____', price[i])
# this prints the name and prices of each item from the list.
Answer: a. intrapersonal and short-term goals
Explanation:
Intrapersonal goals are those that we set for ourselves in our minds to accomplish. The students that are finishing their homework after school most probably set that goal in their minds and so meeting it would mean meeting their intrapersonal goals.
Homework is not a long term project but rather a short one that is usually meant to be completed within days. Completing it is therefore a short term goal.
The students who finish their homework after school are therefore accomplishing both their intrapersonal and short-term goals.