The below is my code, but I can't get the last few lines to print. I've tried rearranging them, switching from string to float, etc. I don't know if this is just a glitch or a concatenation problem. If so, how would I make the last few lines print with float?
N = []
C= []
Holiday = []
totC = 0
name = input("enter name").upper()
while name != "XXX":
cost = int(input("enter amount to spend >0 and <=10"))
while cost <=0 or cost >10:
print("invalid cost")
cost = int(input("enter amount to spend >0 and <=10"))
gift = name + " " + str(cost)
N.append(name)
C.append(cost)
Holiday.append(gift)
totC = totC + cost
name = input("enter name").upper()
print(Holiday)
print(N)
print(C)
print(totC)
print("Total cost is " + totC)
print("Average cost is" + av)
print("Number of names is " + len(N))
print("Number of costs is " + len(C))