Create a block utilizing a loop which will calculate the number of items which can be purchased on the basis of price of the item and total amount available to spend. Involve one initialized variable in order to represent the price amount and another to represent the total available to spend. The block requires including statements in order to display total number of items which can be purchased and the total amount which would be spent.