It is hard to read your code as you pasted it into the BBS tags incorrectly and lost the formatting (indentation).
I'm guessing that the code should look like this (but I might have indented some things I shouldn't have):
import random #this is to import the random number for calculations
initialBalance = 1000 #this is the initial balance £1000
wholeSalePrice = 10 #this is the wholesale price
shopSalePrice = 40 #shops sells the product for £40
addvertCost = 1,20 #advertising cost is between the range of £1-£20
days = 0
newBalance = 0
#procedures
def costs (wholeSalePrice,productPurchased):
calculations = wholeSalePrice*productPurchased #this is to calculte the wholeslae price by the product purchased price
print (calculations)
return calculations
def calcNewBalance (newBalance,addvertCost,productPurchased): #this is to pass the calculations throgh the parameter
answer = newBalance-addvertCost-productPurchased #this is to output the new balnace after deducting the advertising cost and the product purchased cost from the new balnace
print (answer)
return answer
def calculateSalesFigures(salesFigures): #this is to generate a number to calculate sales on a daily basis
sales = random.randint(1,50)
print (sales)
return sales
def expenses(everyDayExpenses): #this is to calculate the daily expenses
WholeSalePrice = 4
stock = 5
dailyExpenses = WholeSalePrice*stock
print (dailyExpenses)
return dailyExpenses
def balanceUpdate(newBalance,salesFigure,dailyExpenses):
updatedBalance = (newBalance + salesFigure - dailyExpenses)#this is the remaining balance after the daily expenses
print ("newbalance is £:" + str(updatedBalance))
print (updatedBalance)
return updatedBalance
#input
itemPurchased = int(input("please enter the value for itempurchased £")) #this inforamtion will be displayed for the user to insert the amount
advertisingCost = int(input("please enter a value for addvertcost £")) #this inforamtion will be displayed for the user to insert the amount
productPurchased = int (input ("please enter the amount of products you wish to purchase for stock £")) #this inforamtion will be displayed for the user to insert the amount
advertCost = int(input("Please enter how much you want to spend on advertising £"))
print ("")
#process
while days>0:
days = days + 1
print ("days" + str (days)) #this is the while statement for the loop
randomNumber = random.randint(1,50)
salesFigure = (randomNumber*advertisingCost)
print ("salesFigures is £:" +str(salesFigure)) #this block of code is to work out the sales figure by random number*advertising cost
updatedBalances = (newBalance + salesFigure - dailyexpenses) #this is to display the newbalnce on the users screen
print ("newbalance is £:" + str(updatedBalances))
print ("")
sold = salesFigure // priceOfProduct - shopPrice
if (sold > shopPrice):
lackOfStock = sold - stock
costProfit = lackOfStock*priceOfProduct #this is a block of code for If statement showing working out for handling products sold and in stock
sales = sales - costProfit
#output
if newBalance >=0:
print ("stock is fine ")
else:
print("we need more stock") #this IF statement is to decide if the stock is okay or more stock is needed
costs = (wholeSalePrice,productPurchased) #these are thevariables set for procedures
newBalance = calcNewBalance(newBalance,advertCost,productPurchased)
salesFigure = calculateSalesFigures(0)
dailyExpenses = expenses(0)
updatedBalances = balanceUpdate(newBalance,salesFigure,dailyExpenses)
Commenting is good, but sometimes if too obvious or too long, it is a bit of a problem. Makes it harder to read the code. Some block comments explaining what is going on are usually better in such circumstances.
The input section should be inside the main loop, as the instructions say to repeat step 2. You only do it once. There seems to be some duplication in the questions though, so not sure what is meant to be going on.
The while loop is not executing, because the initial value of days is 0 and the test exits (or bypasses) the loop if days > 0.
Inside the loop, dailyexpenses is referenced before it is defined. Likewise with priceOfProduct, and shopPrice.
You really need to think about going back to paper (yes, paper) with your code and laying out the code structure again. You have a bunch of functions defined, but they are not obviously helping simplify the flow and readability of your code.
I struggled a bit to figure out the calculation of stock holding. Some of the variable naming is very confusing. I appreciate you need to calculate in the simulation the amount of stock sold on the basis of the randomly generated sales values. Just can't get my head around how you are making this calculation as stock quantity and stock value seem to be a bit mixed up.