+ 2

python

hi i have python version 3.8.3 i cant jump to line below without having to run the program. does anyone know what i should do to be able to jump a line down without running the application

20th Jun 2020, 2:32 PM
Mo Parvizi
Mo Parvizi - avatar
4 Answers
+ 5
Go to file >new file Now write your code and save your file Click on run or F5 Now your multiple line code is executed
20th Jun 2020, 4:01 PM
Runtime Terror
Runtime Terror - avatar
+ 2
What do you mean exactly? You mean you cant type multiple lines and then run? It just runs every line one at a time when you type them?
20th Jun 2020, 2:55 PM
Slick
Slick - avatar
+ 2
Hi! When you write your code in Python you must write it so you can run the code from a module. Normally this is a text file; you write it with some kind of text editor, save the file with the .py extension and run the code. Then you can jump between the lines while you write your program. But you can also write your code from the interactive prompt. This is actually a module too, but with the difference that it prints the result from your inputed code, and don’t save it. Otherwise it act like a ordinary module. This makes the interactive prompt difficult to use, if you want to write long programs, as you run each line every time you push enter. And you have to rewrite the hole body in compound statemend like a loop, for example, if you for instance make an syntax error. So the interactive promtpt is better for testing small code bits. Otherwise I recommened you use a text editor, like Pythons IDLE, from where you can write, edit, save and run your code, as many times as you like. Regards /Per B
20th Jun 2020, 4:15 PM
Per Bratthammar
Per Bratthammar - avatar