Fourteen Years of Service
Posts: 3,253
Threads: 64
RE: First program help 02-22-2014, 11:22 PM
#15
I usually like to have imported modules at the start of the program (just after your comments and before the variables) and leave a couple of blank lines between the comments, modules, variables and code. It just makes it a little easier to read especially when you come back to it down the line to improve it or add some other features. All in all though not a bad attempt the one thing I will suggest though is to convert the users input to a string rather than having to use "'s around the inputed text.
EDIT:
Ignore that last part about strings I was running the script in 2.7 when this is clearly designed for 3. When using the correct interpreter it run fine *facepalm*
•
Fourteen Years of Service
Posts: 3,253
Threads: 64
RE: First program help 02-22-2014, 11:22 PM
#16
I usually like to have imported modules at the start of the program (just after your comments and before the variables) and leave a couple of blank lines between the comments, modules, variables and code. It just makes it a little easier to read especially when you come back to it down the line to improve it or add some other features. All in all though not a bad attempt the one thing I will suggest though is to convert the users input to a string rather than having to use "'s around the inputed text.
EDIT:
Ignore that last part about strings I was running the script in 2.7 when this is clearly designed for 3. When using the correct interpreter it run fine *facepalm*
•