User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the Python section within the Software Development category of DaniWeb, a massive community of 392,047 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 4,314 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Python advertiser:
Views: 230 | Replies: 4
Reply
Join Date: Jul 2008
Posts: 4
Reputation: flagrl is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
flagrl flagrl is offline Offline
Newbie Poster

writing a program

  #1  
28 Days Ago
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
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Jun 2008
Location: Ireland
Posts: 17
Reputation: Epic Tissue is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 0
Epic Tissue's Avatar
Epic Tissue Epic Tissue is offline Offline
Newbie Poster

Re: writing a program

  #2  
28 Days Ago
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.
Reply With Quote  
Join Date: Jun 2008
Location: Fort Lauderdale - Florida
Posts: 19
Reputation: Scuppery is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 0
Scuppery's Avatar
Scuppery Scuppery is offline Offline
Newbie Poster

Re: writing a program

  #3  
28 Days Ago
Originally Posted by flagrl View Post
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

  1. def C2F():
  2. Celsius = input("Enter degrees in Celsius: ");
  3. Fahrenheit = (9.0 / 5.0) * Celsius + 32
  4. 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.
Reply With Quote  
Join Date: Dec 2006
Posts: 208
Reputation: ssharish2005 is on a distinguished road 
Rep Power: 2
Solved Threads: 14
ssharish2005 ssharish2005 is offline Offline
Posting Whiz in Training

Re: writing a program

  #4  
28 Days Ago
Originally Posted by Epic Tissue View Post
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
Reply With Quote  
Join Date: Jun 2008
Location: Ireland
Posts: 17
Reputation: Epic Tissue is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 0
Epic Tissue's Avatar
Epic Tissue Epic Tissue is offline Offline
Newbie Poster

Re: writing a program

  #5  
27 Days Ago
Well I use Eclipse
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb Python Marketplace
Thread Tools Display Modes

Similar Threads
Other Threads in the Python Forum

All times are GMT -4. The time now is 11:23 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC