+ 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

24th Dec 2022, 4:24 AM
Himanshu Pokhriyal
3 ответов
0
You will need a code editor like vs code or you can code online there are many python compilers online
24th Dec 2022, 5:00 AM
BORN-LOSER
BORN-LOSER - avatar
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).
24th Dec 2022, 11:30 AM
Tina
Tina - avatar
0
Python idle is barebones app. repl is just for snippets. Use other editors... Vscode, SublimeText, etc.
25th Dec 2022, 6:25 AM
Bob_Li
Bob_Li - avatar