Jump to content

How do I make my stupid interpritor run multiline commands?!?!

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
2 replies to this topic

#1
toxifyshadow

toxifyshadow

    Programmer

  • Members
  • PipPipPipPip
  • 125 posts
In the interpritor I use for python, I can only do 1 line commands, such as:

print "Hello Codecall"

And I need to write multiline commands, and run them at once, like this:

w = 5

h = 10

a = w*h

print a

When you press Enter it runs that line.
I also tried writing the command in Notepad, copy and paste in to python and run, all that does is bring me to a new line / new command.
So how do I make multiline files run?
Posted Image

#2
Root23

Root23

    Programmer

  • Members
  • PipPipPipPip
  • 144 posts
It sounds like you're typing your code in the shell, which is (afaik) only good for testing out a line of code to see what the result will be.

Trying click File - > New in that window.

You should have a new window pop-up as "Untitled", and from there you can write your script.

Hope this helps.
Posted Image

#3
Guest_x42_*

Guest_x42_*
  • Guests
press ctrl+n, and you will get a text editor for writing programs