Southern New Hampshire University Debugging Reflection Paper What is important is developing the skill of learning how to understand your errors and then f

Southern New Hampshire University Debugging Reflection Paper What is important is developing the skill of learning how to understand your errors and then fix them (debugging). Explain the importance of knowing how and when to use lists, dictionaries, and loop types. Support your response with examples from the sample code below:

Two simple paragraphs.

Don't use plagiarized sources. Get Your Custom Essay on
Southern New Hampshire University Debugging Reflection Paper What is important is developing the skill of learning how to understand your errors and then f
Get an essay WRITTEN FOR YOU, Plagiarism free, and by an EXPERT!
Order Essay

# grocery_item

grocery_item = dict()

# grocery_history

grocery_history = list()

# go

go = True

# loop till go is true

while go:

# take input for item_name, quantity,cost

item_name = input(“Item name:n”)

quantity = int(input(“Quantity purchased:n”))

cost = float(input(“Price per item:n”))

# update grocery_item with new data

grocery_item = {‘name’:item_name, ‘number’: int(quantity), ‘price’: float(cost)}

# append to list

grocery_history.append(grocery_item)

# ask user again for input

dt = input(“Would you like to enter another item?nType ‘c’ for continue or ‘q’ to quit:n”)

if dt == “q”:

go = False # if q set go to False

grand_total = 0.0 # declare grand total

for each in grocery_history:

item_total = each[‘price’]*each[‘number’] # cal item_total

# print details

print(str(each[‘number’]) +” “+str(each[‘name’]) + ” @ $” +str(‘%.2f’ % each[‘price’])+” ea $” + str(‘%.2f’ % item_total))

# add item_total to grand_total

grand_total = grand_total + item_total

item_total = 0.0 # set item_total to 0

print(“Grand total: $”+ str(‘%.2f’ % grand_total))

superadmin

Recent Posts

What is the easy difination of science | Quick Solution

Science is the pursuit and application of knowledge and understanding of the natural and social…

3 years ago

definition, values, meaning of such values and type of goods with such elasticity value …….. | Quick Solution

Clearly stating the definition, the values, the meaning of such values and the type of…

3 years ago

Acct 422 – Nora D | Quick Solution

All answered must be typed using Times New Roman (size 12, double-spaced) font. No pictures…

3 years ago

Acct 322 – Nora D | Quick Solution

All answered must be typed using Times New Roman (size 12, double-spaced) font. No pictures…

3 years ago

Macro Economics Question | Quick Solution

https://www.npr.org/sections/ed/2018/04/25/605092520/high-paying-trade-jobs-sit-empty-while-high-school-grads-line-up-for-university Click on the link above. Read the entire link and answer the questions below…

3 years ago

MGT 322 – Nora D | Quick Solution

All answered must be typed using Times New Roman (size 12, double-spaced) font. No pictures…

3 years ago