I have this programme (annotated) I want allow it to run more than once any tips or even better python code. :)

abbasmo at centralfoundationboys.co.uk abbasmo at centralfoundationboys.co.uk
Tue Oct 13 07:33:12 EDT 2015


import time
#this is so that i can set a timer
print ("only print numbers as your answers (Round all numbers up):   ")
time.sleep(2)
#this is to let the person know what format to write it in#
answer = input ("enter the height of the room walls between 2 to 6 metres:   ")
#this is the first input to understand what the client wants#
print (answer)
#this is to let the client know what value they have put in to see if they have made a mistake#
while answer == range(2,6):
    Q1
#this lets the programme know which figures are acceptable#
Q1 = input("enter length of room walls between 1 to 25 metres:     ")
#this the second question that is chosen#
print (Q1)
#This is again to let the client know what number they have inserted in case they have made an error
while Q1 == range(1,25):
    Q2
#this is to let the programme know the numbers that are acceptable#
Q2 = input("choose the price of paint that you want. Luxury = 175 Standard cost 100 Economy = 45 ALL PRICES MULTIPLIED BY 100  :     ")
#this is the final question that is asked#
print (Q2)
#this the final indication of what the client has inserted into the equasion#



y = (int(answer) * int(Q1)* int(Q2))
#This tells the programme to multiply the numbers together#
print (y/100 + 0.5)
#this is because the programme only accepts whole numbers and to get the real value i needed to devide by 100
time.sleep(25)

#problem with this programme is that it allows any number to be placed in the system and also that it stops straight away hence the timer. if you have any advice I would love to hear#



More information about the Python-list mailing list