Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Sublime Text Set Up Problem: Code Not Running

I am setting up Sublime Text for using Python 3 and I am trying to run a very basic problem of calculating simple interest. However, my code just doesn't run. It builds just fine and shows no error. But it isn't taking input from the first step and doesn't do anything after that.

I have tried to change the build system. I installed Python 3 using terminal. Then I tried to see if the code runs on my friends Ubuntu environment, which it does on Spyder 3. Then I tried to create a custom system build for Python 3. But nothing seems to work.

Program to calculate simple interest:

p = float(input("Enter the Principal Amount : "))
r = float(input("Enter the Rate : "))
t = float(input("Enter the Time : "))
SI = ((p * r * t) / 100)
print("The Simple Interest is {}" .format(SI))

I am only getting the following output:

Enter the Principal Amount : 10

(The number 10 is typed by me. Nothing more happens even after i press enter)

like image 434
Prateek Kabra Avatar asked Nov 25 '25 04:11

Prateek Kabra


1 Answers

Sublime Text does not support inputting data into a program. You can up vote this feature request on: Currently you can try to install the package and use it to run you program from a Sublime Text view. You you can try out the VSCode editor, which is pretty similar with Sublime Text.

Source

like image 168
Omega Avatar answered Nov 26 '25 18:11

Omega