I've got the task of looping a function that allows for an imaginary person to spend up to £100 or whatever currency until the 100 runs out in which case the script just ends. While the script is running it adds up each of the values and keeps track until the threshold is met!
#This line should initialise a variable
while #I need Finish this line with a loop condition.
x = int( input("How much is the next item? ") )
tot = tot+x
print("You cannot afford that! You only have £" + str(100-(tot-x)) + "