Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help with my first program
#1
Hi everybody, I have just started learning Python and have just jumped straight in and given it a go as thats what most people recommend.

At work (Underfloor heating design) we have to 2 design teams "Runners" and "Repeaters" and each team handles different projects, I would like to create a small program that can aid anybody not in the design department to see which of the 2 design teams will design the project. 

I would like the program to ask a series of questions to determine which team it goes to, the program does work to some degree however when it comes to a conclusion the program just terminates and doesn't give the user anytime to read the result. Also I dont think the way I have used If and Else is correct and there is probably a much more efficient way of doing it all. 

Sorry for the long post but please find my code below, any help would be greatly appreciated. 
          
#The NS record is basically the customer account number
NSname = input("Please enter the NS Record ")


HP = input ("Is the project using a Nu-Heat Heat Pump?, Yes or No ")

if HP == 'Yes':

   print ("This is a Repeater project")

   if HP == 'Yes':

       raise SystemExit    

     

Size = input ("Is the project over 200 SQM? ")

if Size == 'Yes':

   print ("This is a Repeater project")

   if Size == 'Yes':

       raise SystemExit  



LPM = input ("Is this project over 120 SQM of Lo-Pro Max? ")

if LPM == 'Yes':

   print ("This is a Repeater project")

   if LPM == 'Yes':

       raise SystemExit


LP = input ("Is this project over 60 SQM of Lo-Pro10? ")

if LP == 'Yes':

   print ("This is a Repeater project")

   if LPM == 'Yes':

       raise SystemExit


else:

   print ("This is a runner")
Reply


Messages In This Thread
Help with my first program - by CadWizard - Feb-21-2017, 09:10 PM
RE: Help with my first program - by wavic - Feb-21-2017, 10:08 PM
RE: Help with my first program - by ichabod801 - Feb-21-2017, 11:50 PM
RE: Help with my first program - by CadWizard - Feb-22-2017, 08:48 AM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020