Hello and welcome to Python and the forums!
First, you don't need to tell Python what data type a variable should be, it figures that out when it is assigned. So you can leave out float before 0.6, string before "apple" etc. You do however need it when you take input from a user and want to use that input as something other than a string. Your code handles that properly already.
item_total variable is a concatenation of 3 strings, I doubt you want that. To me it seems that apple_total, banana_total and cabbage_total are doing what you expect correctly. And after that you get the total sum in order_total. Here is one way of doing it:
First, you don't need to tell Python what data type a variable should be, it figures that out when it is assigned. So you can leave out float before 0.6, string before "apple" etc. You do however need it when you take input from a user and want to use that input as something other than a string. Your code handles that properly already.
item_total variable is a concatenation of 3 strings, I doubt you want that. To me it seems that apple_total, banana_total and cabbage_total are doing what you expect correctly. And after that you get the total sum in order_total. Here is one way of doing it:
# Define variables item_total = 0 order_total = 0 # Welcome print("Hello welcome to the store") # Input item1_apple = "apple" item1_qty = int(input("please enter number of apples = ")) item1_price = 0.6 item2_banana = "banana" item2_qty = int(input("please enter number of bananas = ")) item2_price = 1.5 item3_cabbage = "cabbage" item3_qty = int(input("please enter number of cabbage = ")) item3_price = 3 # process item_total = (item1_apple + item2_banana + item3_cabbage) apple_total = (item1_qty * item1_price) banana_total = (item2_qty * item2_price) cabbage_total = (item3_qty * item3_price) order_total = apple_total + banana_total + cabbage_total print('Order total: ${}'.forma# Define variables item_total = 0 order_total = 0 # Welcome print("Hello welcome to the store") # Input item1_apple = "apple" item1_qty = int(input("please enter number of apples = ")) item1_price = 0.6 item2_banana = "banana" item2_qty = int(input("please enter number of bananas = ")) item2_price = 1.5 item3_cabbage = "cabbage" item3_qty = int(input("please enter number of cabbage = ")) item3_price = 3 # process apple_total = (item1_qty * item1_price) banana_total = (item2_qty * item2_price) cabbage_total = (item3_qty * item3_price) order_total = apple_total + banana_total + cabbage_total print('Order total: ${}'.format(order_total)) print('-' * 30) print("order total for {} are ${:.2f}".format(item1_apple, apple_total)) print('-' * 30) print("order total for {} are ${:.2f}".format(item2_banana, banana_total)) print('-' * 30) print("order total for {} are ${:.2f}".format(item3_cabbage, cabbage_total)) print('-' * 30)The code has a lot of relations between variables (for example item and its price and quantity). So it could be greatly improved by using lists and dictionaries. I suggest you to dig into the topic and modify your code with using them. If you will have questions/problems feel free to post back.