when you are writing a program and you get an errer do you have to start all over again or is it ok to go on. i am just writing some of the programs that are on this site in the sticky's i am writing them in the command line but also in IDLE? which one is better to use

Member Avatar for Epic Tissue

If you define a function properly and then go to use it and get an error while using it (a typo or something), you don't have to define the function again.

when you are writing a program and you get an errer do you have to start all over again or is it ok to go on. i am just writing some of the programs that are on this site in the sticky's i am writing them in the command line but also in IDLE? which one is better to use

Ok here is what you need to know when it comes to writing a program IDLE is 100 times better than the command line. Yet, when it comes to running a program they look better in the command line. There are a couple of ways to run your program again so here are some scenarios using a very simple program that converts Celsius to Fahrenheit.

If you open the python interpreter(IDLE) you can write a simple program and run it. Here is the program that converts Celsius to Fahranheit

def C2F():
	Celsius = input("Enter degrees in Celsius: ");
	Fahrenheit = (9.0 / 5.0) * Celsius + 32
	print Celsius, "Celsius =", Fahrenheit, "Fahrenehit";

This is a very simple program that you can run over and over by just typing C2F() (keep in mind that you must have already written then program to run it. Trust me I've seen some weird cases). So basically all you need to is define a function and write your program so that you can keep running it over and over . Hopefully that helped you and good luck programming.

If you define a function properly and then go to use it and get an error while using it (a typo or something), you don't have to define the function again.

Well, why dont you get a good IDE and start coding in there. I IDE which I have been using is pyscripter. Thats a cool IDE with lots of updates now and then.

ssharish

Member Avatar for Epic Tissue

Well I use Eclipse

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.