+ 1

When i do '6+3' or any mathematical operations directly in python compiler of sololearn, it shows "no output". What should i do?

13th Mar 2018, 2:58 PM
Harshit Porwal
6 odpowiedzi
+ 6
That would only work in the interactive mode, which gives you outputs right away. It’s usually marked with a >>> where you are writing. The script mode is what you have in SoloLearn, and it’s what you use in python for writing long pieces of reusable code.
13th Mar 2018, 3:19 PM
Pedro Demingos
Pedro Demingos - avatar
+ 2
CodePlayground is a Python interpreter. For direct output you need to use the Python shell. If you install Python 3 on your computer, you'll get a program called "IDLE". That's the interactive shell. IDLE is short for "Interactive Development and Learning Environment. File -> New in the shell will open an interpreter where you can write code and save it as a .py file. On Linux you can use ipython, an interactive Python shell which works directly in the terminal.
13th Mar 2018, 3:31 PM
Chris
Chris - avatar
+ 1
the sololearn thing is a playground / ide with stripped language. you need an interactive mode to do straight up calculations, like python shell or idle interactive mode
13th Mar 2018, 3:22 PM
Markus Kaleton
Markus Kaleton - avatar
+ 1
python is part of every linux installation, you write either python or python3 to terminal and it will run the shell
13th Mar 2018, 3:46 PM
Markus Kaleton
Markus Kaleton - avatar
0
it only works in shell. you have to print(6+3)
13th Mar 2018, 3:08 PM
Markus Kaleton
Markus Kaleton - avatar
0
you mean that this works only in official python compiler and what shown here is just for demonstration?
13th Mar 2018, 3:10 PM
Harshit Porwal