Shopping trip


#1

Would I be able to use this format for starting a personal project after my shopping trip today? It would be more then one item? If so, How exactly would I write that out? Would it be a mix of 9/14 Module and 7/14? If this is a possible project, I might start doing it after every shopping trip I do to get more practice.

Thanks for any help in advanced. :slight_smile:


Why is total_cost a float?
#2

How is this related to the FAQ you posted to?

You can use lists for more then one item:

["item1", "item2", "item3"]

or if you want to have an item associated with a price, use a dictionary.

Surely its possible, but not sure what you are after


#3

My apologies. Still learning. This is my first experience with code.


#4

I did it. It was a learning curve. but it feels good.


123 Name St.
Denver, CO""")

mac = 1.00
price_per_mac = 1.00
total_cost = mac * price_per_mac
print("Michelina Cheese Wheels = $" +str(total_cost))

buns = 1.00
price_per_buns = 1.99
total_cost1 = buns * price_per_buns
print("Kroger Buns = $" +str(total_cost1))

pickles = 1.00
price_per_pickle = 3.67
total_cost2 = pickles * price_per_pickle
print("Famous Dave\'s Hot Pickles = $" +str(total_cost2))

pasta_sauce = 1.00
price_per_pasta_sauce = 1.99
total_cost3 = pasta_sauce * price_per_pasta_sauce
print("Barlla Pasta Sauce = $" +str(total_cost3))

tomatoes = 1
price_per_tomatoes = 0.48
total_cost4 = tomatoes * price_per_tomatoes
print("Tomatoes = $" +str(total_cost4))

mangoes = 2.00
price_per_mangoes = 1.50
total_cost5 = mangoes * price_per_mangoes
print("Mangoes = $" +str(total_cost5))

green_onions = 2.00
price_per_green_onions = 0.49
total_cost6 = green_onions * price_per_green_onions
print("Green Onions = $" +str(total_cost6))

green_chilies = 2.00
price_per_green_chilies = 0.89
total_cost7 = green_chilies * price_per_green_chilies
print("Kroger Green Chilies = $" +str(total_cost7))

lighters = 5.00
price_per_lighter = 1.00
total_cost8 = lighters * price_per_lighter
print("5 Pack Bic Lighters = $" +str(total_cost8))

print("Age Restricted 18")

coffee = 2
price_per_coffee = 3.99
total_cost9 = coffee * price_per_coffee
print("International Delights Iced Coffee Vanilla = $" +str(total_cost9))

total_cost10 = total_cost + total_cost1 + total_cost2 + total_cost3 + total_cost4 + total_cost5 + total_cost6 + total_cost7 + total_cost8 + total_cost9

print("Total Shopping Trip Cost $" +str(total_cost10))```