School Assignment? Project Due Tomorrow? Chat LIVE With A Programming Expert!

Welcome to Dream.In.Code
Become an Expert!

Join 307,096 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 2,027 people online right now. Registration is fast and FREE... Join Now!




Line down problem

 

Line down problem

Shockwave

22 Aug, 2009 - 02:08 PM
Post #1

New D.I.C Head
*

Joined: 22 Aug, 2009
Posts: 1


My Contributions
I don't know how to put the line down on the interpreter.

Like this:
CODE
def main():
endProgram ='no'


Please tell me how to do this!

It just end up
CODE
def main(): endProgram ='no'


User is offlineProfile CardPM
+Quote Post


FreezingDigits

RE: Line Down Problem

27 Aug, 2009 - 03:47 PM
Post #2

New D.I.C Head
*

Joined: 17 Jul, 2009
Posts: 24



Thanked: 3 times
My Contributions
If you're working with Python 2.5 or 3.1(as these are the ones I just tested with), as soon as you put in the : and press enter the interpreter should automatically go to the bottom line and should already be indented - allowing you to type in your code.
User is offlineProfile CardPM
+Quote Post

code_m

RE: Line Down Problem

31 Aug, 2009 - 09:20 AM
Post #3

D.I.C Head
**

Joined: 21 Apr, 2009
Posts: 124



Thanked: 8 times
My Contributions
In the interpreter, just Hit enter:

CODE

>>> def main():
...    end_program = 'no'


To leave editing main, just hit enter on an empty line:

CODE

>>> def main():
...    end_program = 'no'
...
>>>

User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic

Time is now: 11/21/09 11:51AM

Live Help!

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter Fan Us On Facebook

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month