+ 1
Is python interpreter or compiler
When i write a code in my laptop python idle a = int(input("enter the age")) It immediately asks for the input after pressing enter Can i do something like first i complete my full code then it ask for input and run line by line How to fix it So i can write code like a = int(input("enter the age")) b = input("enter the name") Then run it
4 Answers
0
You will need a code editor like vs code or you can code online there are many python compilers online
0
Himanshu Pokhriyal to answer the title, it is interpreter (you need it every time you want to run your code)
python idle starts in a shell like environment, displaying >>> to read and execute a line of code.
go to File/New menu, then write your code , save it with ".py" extension , like mycode.py then from the menu choose Run/Run module.
Also you can write your program in any text editor as long as it can save in plain text format then run it with "python mycode.py"
Best option is to use a better IDE for python (I don't program in py so better to search. I remember pycharm was one option).
0
Python idle is barebones app. repl is just for snippets. Use other editors... Vscode, SublimeText, etc.